Skip to content

Conversation

@dmjio
Copy link
Contributor

@dmjio dmjio commented Sep 19, 2025

jsaddle by default re-exports a large number of modules from ghcjs-base when compiling with the JS backend. This PR is the first step in extending jsaddle to support WASM JS FFI calls in jsaddle-wasm.

This is in contrast to the current solution of relying on the jsaddle command protocol internally (as seen in jsaddle-warp), to route commands via a TQueue.

By using the WASM JS FFI performance should increase.

This PR splits up the existing code into src-js and src-wasm (JS code remains unchanged). Per @amesgen, not all modules are required to be ported, just a subset (as demonstrated in the cabal file).

  • Adds flake.nix that references miso multi-compiler support
  • Adds a Github workflow CI for compilation w/ JS / WASM 9.12.2 backends
  • Port existing JS FFI logic to WASM FFI.

`jsaddle` by default re-exports a large number of modules from
`ghcjs-base` when compiling with the JS backend. This PR is the first step in
extending `jsaddle` to support WASM JS FFI calls in `jsaddle-wasm`.

This is in contrast to the current solution of relying on the `jsaddle` command protocol internally (as
seen in `jsaddle-warp`), to route commands via a `TQueue`.

By using the WASM JS FFI performance should increase.

This PR splits up the existing code into `src-js` and `src-wasm` (JS
code remains unchanged). Per @amesgen, not all modules are required to be ported, just a subset (as
demonstrated in the cabal file).

- [x] Adds `flake.nix` that references `miso` multi-compiler support
- [x] Adds a Github workflow CI for compilation w/ JS / WASM 9.12.2 backends
- [ ] Port existing JS FFI logic to WASM FFI.
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