You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have been trying to compile a rather big project for wasm32-unknown-emscripten using cargo on Windows.
Unfortunately, the linking process fails when trying to run emcc.bat because the command line invoked is too long for Windows' limitations (about 8k characters). error: linking with `emcc.bat` failed: exit code: 1 note: The command line is too long.
After manually counting, the command indeed is too big with in my case about 11k characters, as it includes the absolute path of every single .o and .rlib files. My project, while including piston as a dependency, does not have an incredibly large amount of them, which makes me believe this could be an important issue in the long run (this does not apply to Linux however as the maximum character limit is much higher).
After a little bit of digging, emscripten seems to provide a workaround for this problem by accepting parameters from files. However it has to be handled by the user, that is I believe cargo.
I'm not entirely sure if this issue belongs here as I'm quite new to cargo and how targets work. Sorry if I failed on that matter.
Thanks in advance for your help.
The text was updated successfully, but these errors were encountered:
Thanks for the report! I think that this is a bug for upstream rust-lang/rust though as Cargo isn't invoking emcc.bat, could this be reopened over there?
Hello.
I have been trying to compile a rather big project for wasm32-unknown-emscripten using cargo on Windows.
Unfortunately, the linking process fails when trying to run emcc.bat because the command line invoked is too long for Windows' limitations (about 8k characters).
error: linking with `emcc.bat` failed: exit code: 1
note: The command line is too long.
After manually counting, the command indeed is too big with in my case about 11k characters, as it includes the absolute path of every single .o and .rlib files. My project, while including piston as a dependency, does not have an incredibly large amount of them, which makes me believe this could be an important issue in the long run (this does not apply to Linux however as the maximum character limit is much higher).
After a little bit of digging, emscripten seems to provide a workaround for this problem by accepting parameters from files. However it has to be handled by the user, that is I believe cargo.
I'm not entirely sure if this issue belongs here as I'm quite new to cargo and how targets work. Sorry if I failed on that matter.
Thanks in advance for your help.
The text was updated successfully, but these errors were encountered: