-
Notifications
You must be signed in to change notification settings - Fork 46
Closed
Labels
Description
The crate does not support to be compiled with wasm32-unknown-unknown. It there any will to add support for it in the close future?
$ wasm-pack build
error[E0433]: failed to resolve: use of undeclared type or module `sys`
--> /home/regl/.cargo/registry/src/github.com-1ecc6299db9ec823/errno-0.2.4/src/lib.rs:35:9
|
35 | sys::with_description(*self, |desc| {
| ^^^ use of undeclared type or module `sys`
error[E0433]: failed to resolve: use of undeclared type or module `sys`
--> /home/regl/.cargo/registry/src/github.com-1ecc6299db9ec823/errno-0.2.4/src/lib.rs:46:9
|
46 | sys::with_description(*self, |desc| match desc {
| ^^^ use of undeclared type or module `sys`
error[E0433]: failed to resolve: use of undeclared type or module `sys`
--> /home/regl/.cargo/registry/src/github.com-1ecc6299db9ec823/errno-0.2.4/src/lib.rs:50:25
|
50 | self.0, sys::STRERROR_NAME, fm_err.0),
| ^^^ use of undeclared type or module `sys`
error[E0433]: failed to resolve: use of undeclared type or module `sys`
--> /home/regl/.cargo/registry/src/github.com-1ecc6299db9ec823/errno-0.2.4/src/lib.rs:69:5
|
69 | sys::errno()
| ^^^ use of undeclared type or module `sys`
error[E0433]: failed to resolve: use of undeclared type or module `sys`
--> /home/regl/.cargo/registry/src/github.com-1ecc6299db9ec823/errno-0.2.4/src/lib.rs:74:5
|
74 | sys::set_errno(err)
| ^^^ use of undeclared type or module `sys`
Metadata
Metadata
Assignees
Labels
Projects
Milestone
Relationships
Development
Select code repository
Activity
lambda-fairy commentedon Mar 1, 2019
What would you like the library to do in this case?
If you want to match what
std
does -- have a placeholder that returns0
-- then that's okay with me. My only concern is that it might be confusing, especially ifstd
adds a realerrno
implementation in the future.lambda-fairy commentedon Mar 1, 2019
Also, what's your use case for this? Most of the packages that depend on
errno
don't make sense on the web anyway.Zaechus commentedon Oct 25, 2019
I'm having the same issue when compiling to wasm32-wasi. The build fails with the same error message for both stable and nightly channels.
lambda-fairy commentedon Oct 31, 2019
WASI support sounds reasonable to me. I'll be happy to review a PR that adds it.
lambda-fairy commentedon Mar 27, 2020
We support WASI now, so I believe this can be closed.
Itanq commentedon Apr 2, 2020
Hi @lambda-fairy , Could you please tell me in which version the support for wasm was added?
I use the latest version(v0.2.5), the problem still here. as following:
lambda-fairy commentedon Apr 2, 2020
@Itanq try rust nightly with the
wasm32-wasi
target, as mentioned in CI:https://github.com/lambda-fairy/rust-errno/blob/master/.travis.yml
wasm32-unknown-unknown
is bare WASM with no WASI, so I don't think it should work there.Itanq commentedon Apr 4, 2020
got it, it work, thank you very much!