8000 Draft: Add support for some "essential" external features in targetPureWasm. by sjrd · Pull Request #38 · scala-wasm/scala-wasm · GitHub
[go: up one dir, main page]

Skip to content

Draft: Add support for some "essential" external features in targetPureWasm. #38

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

Conversation

sjrd
Copy link
Collaborator
@sjrd sjrd commented Apr 30, 2025

Namely: print, nanoTime, currentTimeMillis and random.

TODO: This won't work in the component model, as it requires four
dedicated imports. Needs fixing before it can be merged.

Draft PR for getting the CI to run on the rest.

sjrd added 3 commits April 30, 2025 10:31
This loader file does not expose any of the JS interop features.
This way, we can use the standard `run` (and later `test`) sbt
commands, while verifying that are indeed not touching any JS.

Moreover, the build sets up the most limited flags for Node.js
based on the linker config, so we also don't have to take care of
that while testing.
Like in an explicit `toString()` call dispatch, we must handle
hijacked values in string concatenation with something that is an
ancestor of hijacked classes.
Namely: `print`, `nanoTime`, `currentTimeMillis` and `random`.

TODO: This won't work in the component model, as it requires four
dedicated imports. Needs fixing before it can be merged.
@tanishiking
Copy link

Let me close for #55

@sjrd sjrd deleted the provide-essential-externs-to-target-pure-wasm branch May 27, 2025 14:25
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.

2 participants
0