Skip to content

Distribute CLI as precompiled wasm blob #38

@Nemo157

Description

@Nemo157

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions