-
-
Notifications
You must be signed in to change notification settings - Fork 1k
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
build fails for wasm32-wasi target #1780
Comments
Yeah i don't think we support or have focused supporting this target. Will need to investigate a way out. If possible can you share all the errors? Thanks |
Sure, it is really just those too errors.
|
It's really weird. The only platform-dependent code in clap is located here, and wasm32 is covered. I'll investigate it further later. |
I suspect this is fixed by #1852 . @wucke13 Could you please help confirm that? Or perhaps provide precise instructions on how to reproduce this? My cargo build fails with
|
@CreepySkeleton
You need to install the target, to be able to compile to it:
Other than that: Yes, the original error is fixed, though in exchange for a new one: the
Edit:
I can confirm that the errors decreased and changed, but there are some.
I thought this was a no-brainer, please pardon me for that.
|
@dylni Could you look into this issue and fix it in your crate? |
Brains may be different 😉. No problemo. Basically, the I suspect OsString on |
@pksunkara This is a language limitation. There's no safe way to get anything lossless from I haven't found anywhere else that |
Ignore my previous comment. I was looking at code for The API looks compatible with Unix, so I'll work on an update to add support for the target this week. |
Version 2.2.0 supports this target. |
@CreepySkeleton No problem. I would prefer that it supports as many targets as possible. I think all buildable targets that take arguments are covered now (except sgx), but let me know if you find any others. |
@CreepySkeleton Indeed, compilation succeeds now! |
Rust Version
rustc 1.42.0 (b8cedc004 2020-03-09)
Code
Steps to reproduce the issue
cargo run --target wasm32-wasi
Affected Version of
clap*
master
Actual Behavior Summary
The compilation does not finish due to 31 errors, mostly:
from_bytes
found for structstd::ffi::OsStr
in the current scopeas_bytes
found for reference&std::ffi::OsStr
in the current scopeExpected Behavior Summary
The compilation does finish with 0 errors
Additional context
I really like the idea of having universal bytecode, and I really like powerful CLI tools. I would love to use clap for the wasm32-wasi target!
The text was updated successfully, but these errors were encountered: