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

Distribute CLI as precompiled wasm blob #38

Open
Nemo157 opened this issue Nov 14, 2019 · 1 comment
Open

Distribute CLI as precompiled wasm blob #38

Nemo157 opened this issue Nov 14, 2019 · 1 comment

Comments

@Nemo157
Copy link
Member

Nemo157 commented Nov 14, 2019

Some very quick testing via cargo-wasi shows that everything except colored output appears to work (probably need to add some support for something in termcolor). From a release build wasmtime appears to need ~7s on a Macbook Air to JIT the optimized wasm blob on first run, and it's pretty much instantaneous on future runs.

How to actually do this? 🤷‍♂

One additional thing I would like to do with this is to sandbox the tool more. The only thing it needs access to is stdin+stdout+args, all network and filesystem access should be disabled. It doesn't look like running from wasmtime as a CLI tool supports this, so maybe cbor-diag-cli should use wasmtime as a library if there's some way to do so there.

@Nemo157
Copy link
Member Author

Nemo157 commented Sep 10, 2022

An alternative thought I had recently, we can just publish a wasm32-wasi binary via github releases.

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

No branches or pull requests

1 participant