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

WASM Support #138

Open
1 task
commial opened this issue Dec 29, 2022 · 0 comments
Open
1 task

WASM Support #138

commial opened this issue Dec 29, 2022 · 0 comments
Labels
enhancement New feature or request

Comments

@commial
Copy link
Contributor

commial commented Dec 29, 2022

Supporting a WASM version of MLA would be nice.
For instance, it would allow the support of:

  • in-the-browser opening of compressed and encrypted HTML reports
  • a platform agnostic GUI (in the browser)

Targeting WASM in Rust has some requirements. This issue is made to track them:

  • List actual requirements

For now, compiling to WASM WASI is working:

# Compile to WASI
$ cd mlar
$ cargo build --target=wasm32-wasi --release

# Get the resulting `wasm` file
$ cd /workspace/MLA/target/wasm32-wasi/release/
$ file mlar.wasm 
mlar.wasm: WebAssembly (wasm) binary module version 0x1 (MVP)

# Execute it using `wasmtime` (file access is sandboxed)
$ wasmtime  mlar.wasm list -i /workspaces/MLA/samples/archive_v1.mla -k /workspaces/MLA/samples/test_x25519_archive_v1.pem
...
[ERROR]
...
failed to find a pre-opened file descriptor
...

# Allow accesses to the source directory
$ wasmtime --dir /workspaces/MLA/samples/  mlar.wasm list -i /workspaces/MLA/samples/archive_v1.mla -k /workspaces/MLA/samples/test_x25519_archive_v1.pem | head
big
file_0
file_1
file_10
file_100
file_101
file_102
...
@commial commial added the enhancement New feature or request label Dec 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant