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

Use wasm sysroot for wasm32-wasi target as well #242

Merged
merged 1 commit into from Oct 6, 2020

Conversation

TheBlueMatt
Copy link
Member

wasm32-wasi is an officially-supported target. This lets us build on it.

@elichai
Copy link
Member

elichai commented Oct 6, 2020

Maybe we should do something that will catch all future wasm32 targets? ie

if env::var("TARGET").unwrap().contains("wasm32") {...}

This will also match the sanity checks cfg for wasm:

#[cfg(target_arch = "wasm32")]

#[cfg(target_arch = "wasm32")]

@TheBlueMatt
Copy link
Member Author

The problem is wasm32-unknown-emscripten doesn’t need our sysroot :/

@elichai
Copy link
Member

elichai commented Oct 6, 2020

The problem is wasm32-unknown-emscripten doesn’t need our sysroot :/

When I think about this I'm pretty sure emscripten won't compile our code because we use cfg(arch = "wasm32") but in the toml we use the full target
But it doesn't really matter because emscripten is still badly broken rust-lang/rust#66916

Anyway, after removing all the rand code from the tests they pass with cargo wasi test after this PR

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.

None yet

3 participants