Skip to content
Snippets Groups Projects
  1. May 06, 2024
  2. Mar 18, 2024
  3. Feb 23, 2024
  4. Feb 05, 2024
  5. Dec 07, 2023
  6. Sep 11, 2023
  7. Jul 11, 2023
  8. Jul 07, 2023
  9. Jun 28, 2023
  10. Jun 07, 2023
  11. Jun 22, 2023
  12. Jun 07, 2023
  13. Jun 20, 2023
  14. Jun 19, 2023
  15. Jun 20, 2023
  16. Jun 19, 2023
  17. Jun 17, 2023
  18. Jun 07, 2023
  19. Jun 13, 2023
  20. Jun 09, 2023
  21. Jun 07, 2023
  22. Jun 04, 2023
  23. Jun 02, 2023
  24. Jun 01, 2023
    • Narcis Beleuzu's avatar
    • Chris Fallin's avatar
      Bug 1831030 - JS shell on WASI: add basic Wizer integration. r=jandem · 0d193086
      Chris Fallin authored
      This patch allows the use of a JS shell binary, compiled to
      `wasm32-wasi` (WASI ABI on WebAssembly), to make use of the Wizer
      snapshotting tool to embed JavaScript source with SpiderMonkey to run in
      a standalone Wasm module.
      
      If enabled with `--enable-js-shell-wizer`, the shell no longer provides
      an interactive REPL; instead, when invoked during the "initialization"
      phase of Wizer, it reads JS source on standard input, then
      saves JS state (the global, the context, etc) for later. When the
      execution is snapshotted and the snapshot is later executed as an
      ordinary WASI command, the resume entry-point invokes a JS function
      named `main` in the global scope, if any.
      
      An example of how to use this follows:
      
      ```
      $ echo "function main() { print('hello world'); }" | \
        wizer --allow-wasi -r _start=wizer.resume obj-release/dist/bin/js \
        -o snapshotted.wasm
      
      $ wasmtime snapshotted.wasm
      hello world
      $
      ```
      
      Differential Revision: https://phabricator.services.mozilla.com/D176979
      0d193086
  25. May 31, 2023
  26. May 25, 2023
  27. May 24, 2023
  28. May 23, 2023
Loading