Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.
Sign upemscripten support broken by cargo file layout changes #38454
Comments
This comment has been minimized.
This comment has been minimized.
|
This is likely due to rust-lang/cargo#3102, not a rustc change itself. That tweaked how Cargo deals with the directory structure a bit, and namely assumes that if you hard link a "binary" to a new location it will continue working. Turns out that's not true for emscripten though! |
sanxiyn
added
the
O-asmjs
label
Dec 30, 2016
brson
added
the
O-wasm
label
Dec 30, 2016
This comment has been minimized.
This comment has been minimized.
|
Thanks for the report @CryZe. |
brson
changed the title
emscripten support broken in latest nightly builds
emscripten support broken by cargo file layout changes
Jan 3, 2017
This comment has been minimized.
This comment has been minimized.
|
I didn't try, but does this mean that Cargo will break source map support as well? (as in, will it rename |
This comment has been minimized.
This comment has been minimized.
|
Checked, looks the same - |
This comment has been minimized.
This comment has been minimized.
|
@RReverser if this behavior is causing problems we may be able to alter Cargo's behavior as well to be more amenable to emscripten |
This comment has been minimized.
This comment has been minimized.
|
@alexcrichton Well at the moment I've submitted emscripten-core/emscripten#4936 to Emscripten, so it will be the only blocker to get separate memory init file in Rust, and also it seems to block ability to debug with source maps when building with Cargo. Would you want to have a special Cargo behavior for |
This comment has been minimized.
This comment has been minimized.
|
Awesome, thanks! We may also want to have special support for this in Cargo. IIRC this is also an issue for Windows with |
This comment has been minimized.
This comment has been minimized.
|
@alexcrichton I'm wondering if inverting folder copies would help (that is, for top-level target build in the Then, when you're looking for cached result, you still look for the hashed one in |
This comment has been minimized.
This comment has been minimized.
|
@RReverser that... sounds like a great idea! |
This comment has been minimized.
This comment has been minimized.
|
This looks like a Cargo issue, since as far as I know rustc itself doesn't really have any special logic along these lines. As such, I'm going to close; please refile there if this is still a problem. |
CryZe commentedDec 18, 2016
•
edited
Looks like the compiler uses hashes as postfixes for the deps now. This messes with emscripten though, as the final "binaries" don't get copied out of the deps folder correctly anymore. Also the original names get baked into the JS files, so even if copied out correctly, they can't find each other anymore.
To clarify, the final JS binary is located in the
target/asmjs-unknown-emscripten/release/folder asaoc.jslike intended. However there's noaoc.js.memfile like there used to be. That's because the deps are calledaoc-66434e595ec0b4e8now, so the compiler spits out the binaries with that name. However rustc only copies out theaoc-66434e595ec0b4e8.jsasaoc.js, but not the mem file. But even if it copied out the mem file, it wouldn't be able to rename it, because theaoc.jslooks specifically for the original name.Ping: @brson