Skip to content

Feat: Adds rust config options to detect threading support in oxide #18292

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

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

jlukic
Copy link

@jlukic jlukic commented Jun 12, 2025

This modifies Oxide to use helpers for parallel processing that allow Oxide to compile to unknown-unknown.

This lets Oxide work in the browser without dealing with the rabbit hole of permissions around using SharedArrayBuffer which include custom HTTP header requirements like Cross-Origin-Embedder-Policy and Cross-Origin-Opener-Policy

This is used in tailwindcss-iso and you can see the wasm in use in Semantic Playground here

#11610

@jlukic jlukic requested a review from a team as a code owner June 12, 2025 00:29
@thecrypticace thecrypticace self-assigned this Jun 12, 2025
@thecrypticace
Copy link
Contributor

I'm planning on taking a look at this soon btw. One thing I definitely want to figure out is a way to unify the Node + WASM APIs (so like no separate WasmChangedContent or WasmScanner types and what not) so there's less duplication if I can.

@thecrypticace
Copy link
Contributor

Reminder for me to investigate soon: NAPI-RS v3 is out now. There's a chance things can be simplified with that re: WASM

@jlukic
Copy link
Author

jlukic commented Jul 17, 2025

Really good point it seems like that would make everything a lot simpler

https://napi.rs/blog/announce-v3

WebAssembly is the biggest update this time. In V3, you can compile your project into WebAssembly with almost no code changes. If the compilation target is wasm32-wasip1-threads or higher, you can directly run code that uses Rust features like std::thread and tokio in the browser without any additional modifications.

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