compiler: add wasmer-artifact-load,wasmer-artifact-create,static-artifact-load,static-artifact-create feature flags

This commit is contained in:
Manos Pitsidianakis
2022-08-02 13:48:29 +03:00
parent 430a7e2e19
commit 8b096a504e
7 changed files with 162 additions and 14 deletions

View File

@@ -4,7 +4,7 @@
use crate::commands::Binfmt;
#[cfg(feature = "compiler")]
use crate::commands::Compile;
#[cfg(feature = "compiler")]
#[cfg(any(feature = "static-artifact-create", feature = "wasmer-artifact-create"))]
use crate::commands::CreateExe;
#[cfg(feature = "wast")]
use crate::commands::Wast;
@@ -47,7 +47,7 @@ enum WasmerCLIOptions {
Compile(Compile),
/// Compile a WebAssembly binary into a native executable
#[cfg(feature = "compiler")]
#[cfg(any(feature = "static-artifact-create", feature = "wasmer-artifact-create"))]
#[structopt(name = "create-exe")]
CreateExe(CreateExe),
@@ -84,7 +84,7 @@ impl WasmerCLIOptions {
Self::Validate(validate) => validate.execute(),
#[cfg(feature = "compiler")]
Self::Compile(compile) => compile.execute(),
#[cfg(feature = "compiler")]
#[cfg(any(feature = "static-artifact-create", feature = "wasmer-artifact-create"))]
Self::CreateExe(create_exe) => create_exe.execute(),
Self::Config(config) => config.execute(),
Self::Inspect(inspect) => inspect.execute(),