Merge branch 'master' into register-binfmt

This commit is contained in:
ptitSeb
2021-11-05 11:23:20 +01:00
committed by GitHub
5 changed files with 28 additions and 12 deletions

View File

@@ -27,7 +27,7 @@ pub struct Compile {
#[structopt(flatten)]
store: StoreOptions,
#[structopt(short = "m", multiple = true)]
#[structopt(short = "m", multiple = true, number_of_values = 1)]
cpu_features: Vec<CpuFeature>,
}

View File

@@ -29,12 +29,12 @@ pub struct CreateExe {
#[structopt(flatten)]
compiler: CompilerOptions,
#[structopt(short = "m", multiple = true)]
#[structopt(short = "m", multiple = true, number_of_values = 1)]
cpu_features: Vec<CpuFeature>,
/// Additional libraries to link against.
/// This is useful for fixing linker errors that may occur on some systems.
#[structopt(short = "l", multiple = true)]
#[structopt(short = "l", multiple = true, number_of_values = 1)]
libraries: Vec<String>,
}

View File

@@ -68,7 +68,7 @@ pub struct Run {
verbose: u8,
/// Application arguments
#[structopt(name = "--", multiple = true)]
#[structopt(value_name = "ARGS")]
args: Vec<String>,
}

View File

@@ -11,15 +11,32 @@ use structopt::StructOpt;
/// WASI Options
pub struct Wasi {
/// WASI pre-opened directory
#[structopt(long = "dir", name = "DIR", multiple = true, group = "wasi")]
#[structopt(
long = "dir",
name = "DIR",
multiple = true,
group = "wasi",
number_of_values = 1
)]
pre_opened_directories: Vec<PathBuf>,
/// Map a host directory to a different location for the Wasm module
#[structopt(long = "mapdir", name = "GUEST_DIR:HOST_DIR", multiple = true, parse(try_from_str = parse_mapdir))]
#[structopt(
long = "mapdir",
name = "GUEST_DIR:HOST_DIR",
multiple = true,
parse(try_from_str = parse_mapdir),
number_of_values = 1,
)]
mapped_dirs: Vec<(String, PathBuf)>,
/// Pass custom environment variables
#[structopt(long = "env", name = "KEY=VALUE", multiple = true, parse(try_from_str = parse_envvar))]
#[structopt(
long = "env",
name = "KEY=VALUE",
multiple = true,
parse(try_from_str = parse_envvar),
)]
env_vars: Vec<(String, String)>,
/// Enable experimental IO devices