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)] #[structopt(flatten)]
store: StoreOptions, store: StoreOptions,
#[structopt(short = "m", multiple = true)] #[structopt(short = "m", multiple = true, number_of_values = 1)]
cpu_features: Vec<CpuFeature>, cpu_features: Vec<CpuFeature>,
} }

View File

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

View File

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

View File

@@ -11,15 +11,32 @@ use structopt::StructOpt;
/// WASI Options /// WASI Options
pub struct Wasi { pub struct Wasi {
/// WASI pre-opened directory /// 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>, pre_opened_directories: Vec<PathBuf>,
/// Map a host directory to a different location for the Wasm module /// 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)>, mapped_dirs: Vec<(String, PathBuf)>,
/// Pass custom environment variables /// 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)>, env_vars: Vec<(String, String)>,
/// Enable experimental IO devices /// Enable experimental IO devices

View File

@@ -141,15 +141,14 @@ impl Features {
/// Configures whether the WebAssembly multi-value proposal will /// Configures whether the WebAssembly multi-value proposal will
/// be enabled. /// be enabled.
/// ///
/// The [WebAssembly multi-value proposal][proposal] is not /// The [WebAssembly multi-value proposal][proposal] is now fully
/// currently fully standardized and is undergoing development. /// standardized and enabled by default, except with the singlepass
/// Support for this feature can be enabled through this method for /// compiler which does not support it.
/// appropriate WebAssembly modules.
/// ///
/// This feature gates functions and blocks returning multiple values in a /// This feature gates functions and blocks returning multiple values in a
/// module, for example. /// module, for example.
/// ///
/// This is `false` by default. /// This is `true` by default.
/// ///
/// [proposal]: https://github.com/webassembly/multi-value /// [proposal]: https://github.com/webassembly/multi-value
pub fn multi_value(&mut self, enable: bool) -> &mut Self { pub fn multi_value(&mut self, enable: bool) -> &mut Self {