-
Notifications
You must be signed in to change notification settings - Fork 87
feat: support target wasm-unknown-emscripten #100
base: master
Are you sure you want to change the base?
Conversation
@@ -1170,6 +1172,13 @@ fn thread_main() { | |||
.size_t_is_usize(true) | |||
.parse_callbacks(Box::new(Callbacks)); | |||
|
|||
if is_wasm_emscripten { | |||
let emsdk_path = PathBuf::from(env::var("EMSDK").unwrap()); |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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
@@ -1170,6 +1172,13 @@ fn thread_main() { | |||
.size_t_is_usize(true) | |||
.parse_callbacks(Box::new(Callbacks)); | |||
|
|||
if is_wasm_emscripten { | |||
let emsdk_path = PathBuf::from(env::var("EMSDK").unwrap()); | |||
let emsdk_sysroot = emsdk_path.join("upstream/emscripten/cache/sysroot"); |
There was a problem hiding this comment.
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?
add support for compiling rust and FFmpeg to target
wasm-unknown-emscripten
with prebuilt static library