Skip to content
This repository was archived by the owner on May 30, 2023. It is now read-only.

Conversation

@0neSe7en
Copy link

@0neSe7en 0neSe7en commented Sep 7, 2021

add support for compiling rust and FFmpeg to target wasm-unknown-emscripten with prebuilt static library

@0neSe7en 0neSe7en changed the title feat: add wasm-unknown-emscripten target support feat: support target wasm-unknown-emscripten Sep 7, 2021
.parse_callbacks(Box::new(Callbacks));

if is_wasm_emscripten {
let emsdk_path = PathBuf::from(env::var("EMSDK").unwrap());
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this guaranteed to be set?

At very least I'd prefer it to be .expect() with a message that explains what it should contain.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And may add document about target=wasm32-unknown-emscripten in README.md or somewhere else?
User need to install EMSDK and activate it, and compiling FFmpeg with Emscripten also not easy


if is_wasm_emscripten {
let emsdk_path = PathBuf::from(env::var("EMSDK").unwrap());
let emsdk_sysroot = emsdk_path.join("upstream/emscripten/cache/sysroot");
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/cache/ doesn't make it sound like a permanent directory.

Maybe check if the path exists and panic with an error that tells user how to create it?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants