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

Disable nightly features for wasm build #524

Open
themighty1 opened this issue Jun 26, 2024 · 4 comments
Open

Disable nightly features for wasm build #524

themighty1 opened this issue Jun 26, 2024 · 4 comments
Labels
good first issue Good for newcomers

Comments

@themighty1
Copy link
Member

Currently when building tlsn for wasm targets we are forced to use a nightly compiler due to wasm-bindgen-rayon requiring it (see https://github.com/RReverser/wasm-bindgen-rayon/?tab=readme-ov-file#building-rust-code)

The adverse effect of using the nightly compiler is that it activates experimental features which may cause tlsn dependencies to use those features, making the wasm build susceptible to bugs caused by the experimental features.

The solution is to determine which compiler features are nightly-only and to disable those features for the wasm build.

@themighty1 themighty1 added the good first issue Good for newcomers label Jun 26, 2024
@themighty1 themighty1 changed the title DIsable nightly features for wasm build Disable nightly features for wasm build Jun 26, 2024
@danilowhk
Copy link

Can I take this issue?

@themighty1
Copy link
Member Author

@danilowhk , hi. We would appreciate if you did.

Let's make sure this is just a research stage. You could look into it and then document the available paths forward in this issue.
We can then address whether or not to take a specific approach separately with other team members.

@danilowhk
Copy link

Hey @themighty1 , sounds good! Will do some research on it and share a doc here

@danilowhk
Copy link

danilowhk commented Jul 19, 2024

For tlsn-js it seems that the only dependency requiring nightly is wasm-bindegen-rayon

These are the compiler features that require nightly:

  • atomics
  • bulk-memory

But currently, it is not possible to compile `wasm-bindgen-rayon without the atomics feature, as it will give a compiler error:
https://github.com/RReverser/wasm-bindgen-rayon/blob/a947bdce8ef1e4b5456b349bd5b3763fe2516e25/src/lib.rs#L20

The recommendation from the wasm-bindgen-rayon library is to use a fixed nightly version, which in this case would be:

nightly-2022-12-12

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants