Merge pull request #2879 from peterhuene/allow-unknown-exports
Implement the `allow-unknown-exports` option for the run command.
This commit is contained in:
@@ -78,6 +78,10 @@ pub struct RunCommand {
|
||||
#[structopt(flatten)]
|
||||
common: CommonOptions,
|
||||
|
||||
/// Allow unknown exports when running commands.
|
||||
#[structopt(long = "allow-unknown-exports")]
|
||||
allow_unknown_exports: bool,
|
||||
|
||||
/// Grant access to the given host directory
|
||||
#[structopt(long = "dir", number_of_values = 1, value_name = "DIRECTORY")]
|
||||
dirs: Vec<String>,
|
||||
@@ -143,6 +147,8 @@ impl RunCommand {
|
||||
let argv = self.compute_argv();
|
||||
|
||||
let mut linker = Linker::new(&store);
|
||||
linker.allow_unknown_exports(self.allow_unknown_exports);
|
||||
|
||||
populate_with_wasi(
|
||||
&mut linker,
|
||||
preopen_dirs,
|
||||
|
||||
Reference in New Issue
Block a user