wasmerio / wasmer

🚀 The leading Wasm Runtime supporting WASIX and WASI
https://wasmer.io
MIT License
19.04k stars 814 forks source link

CLI: Enable support for multiple engines #5261

Open xdoardo opened 3 days ago

xdoardo commented 3 days ago

Right now the CLI is structured around "compilers". We should change this concept to revolve around runtimes. For example, we have the type

#[cfg(feature = "compiler")]
#[derive(Debug, Clone, clap::Parser, Default)]
/// The compiler options
pub struct CompilerOptions {
    /// Use Singlepass compiler.
    #[clap(long, conflicts_with_all = &["cranelift", "llvm"])]
    singlepass: bool,

    /// Use Cranelift compiler.
    #[clap(long, conflicts_with_all = &["singlepass", "llvm"])]
    cranelift: bool,

    /// Use LLVM compiler.
    #[clap(long, conflicts_with_all = &["singlepass", "cranelift"])]
    llvm: bool,

   ...
}

And it should take into account other runtimes (V8, wamr, wasmi) as well.