Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cli: polish CLI usage patterns #11

Merged
merged 3 commits into from
Aug 10, 2023
Merged

cli: polish CLI usage patterns #11

merged 3 commits into from
Aug 10, 2023

Conversation

guybedford
Copy link
Collaborator

@guybedford guybedford commented Aug 10, 2023

This polishes the CLI arguments handling and basic usage.

CLI help with this change:

WASI Virt

Usage: wasi-virt [OPTIONS] --out <virt.wasm> [component.wasm]

Arguments:
  [component.wasm]  Wasm binary to compose the virtualization into.
                    If not provided, only the virtualization component itself will be generated,
                    which can then be composed via `wasm-tools compose -d virt.wasm component.wasm`

Options:
  -o, --out <virt.wasm>  Output virtualization component Wasm file
      --allow-all        Enable all subsystem passthrough (encapsulation is the default)
      --allow-clocks     Enable clocks
      --allow-exit       Allow the component to exit
      --allow-http       Enable HTTP
      --allow-random     Enable Random
      --allow-sockets    Enable Sockets
  -h, --help             Print help
  -V, --version          Print version

Env:
      --allow-env[=<ENV_VAR>...]  Allow unrestricted access to host environment variables, or to a comma-separated list of variable names
  -e, --env <ENV=VAR>             Set environment variable overrides

Fs:
      --allow-fs                       Allow unrestricted access to host preopens
      --mount <preopen=virtualdir>     Mount a virtual directory globbed from the local filesystem
      --preopen <preopen=hostpreopen>  Configure runtime preopen mappings

Stdio:
      --allow-stdio     Enable all stdio
      --stdio[=<cfg>]   Configure all stdio [possible values: allow, ignore, deny]
      --stderr[=<cfg>]  Configure stderr [possible values: allow, ignore, deny]
      --stdin[=<cfg>]   Configure stdin [possible values: allow, ignore, deny]
      --stdout[=<cfg>]  Configure stdout [possible values: allow, ignore, deny]

@guybedford guybedford merged commit 0d7f879 into main Aug 10, 2023
2 checks passed
@guybedford guybedford deleted the cli-polish branch August 10, 2023 15:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant