-
Notifications
You must be signed in to change notification settings - Fork 227
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
error[E0583]: file not found for module sys
#35
Comments
This line appears to vary from master: When I do a simple cfg check in my own app it appears to be resolved as "unix" so I'm not sure why this is failing. Any workarounds welcome. |
Thanks for the report! This crate needs to add some stubs for the wasm target that all return errors, but otherwise shouldn't be too hard to add. |
I'm getting this error too in a project of my own, and it's kind of mysterious because it seemed to come out of nowhere and when I run this person seems to have found a workaround but I couldn't figure out what it was. @justinmchase did you find a workaround? |
I was not able to other than to not use the library that depended on this. I looked at it for a while and I bet there is a way but I'm not familiar enough with Rust to figure it out yet. For what it's worth I was using WSL on windows but after a bunch of tests it seems like Rust correctly interprets it as unix and there wasn't a problem with the conditional compilation macros in smaller independent tests. |
I think I am getting a similar error. I'm using a library that depends on socket for a WASM project.
|
As far as I can tell, this is still an issue. |
@twitchax that's because wasm isn't supported. |
@Thomasdezeeuw, I was mostly commenting because this issue was closed without explanation. That would have been a helpful note to people who come across this issue. :) |
To be fair the issuer closed it, not the maintainers but I understand. We should probably add a |
Sorry, I think I just closed it because I didn't want to see it in my list of open issues anymore and nobody seemed to care about it. |
@justinmchase, haha, no problem. I think it is still something that would be nice. There are a lot of projects that rely on |
Can confirm that it is an issue for some (if not many) people. I wonder if there is a way to nicely disable or put a placeholder for unsupported targets, so this functionality is disabled, but not blocking compilation of other crates. 🤔 |
I'm closing this in favour of #268 to track wasm support. |
I ended using something like this, it works but in others cases it fails not sure why [target.'cfg(not(target_arch = "wasm32"))'.dependencies]
tokio = { version = "1", features = ["full"] }
async-trait = "0.1.57"
actix-web = "4"
stdweb = "0.4.20" |
Yeah I just found out by nasty Surprise after integrating my Database calls to the front end only to find out that although the queries are crafted correctly that the database structure I am using may in fact use Socket2 nested deep down in its dependency structure, specifically in the aws_auth_sdk. So if you are using any data from an amazon authenticated source, you may be at the migration point. oh well back to the drawing board I guess. Maybe I will give SurealDB a shot. |
I have the same issue. |
@NazarKhlopeniuk what platform are you using? If you're using wasm you can help in #268. |
windows 10 64bit. |
This is the error that I get after running "cargo test" |
Please don't post text as a image, you can put multiple lines line that between "```" to create a code block, see https://docs.github.com/en/get-started/writing-on-github/working-with-advanced-formatting/creating-and-highlighting-code-blocks. The error shown in image seems related to wasm/axum, not Socket2. But if you're pulling in socket2 I'm sorry to say that it won't work for now as we don't support wasm, see #268. |
I am getting this error while run wasm-pack build. Anyone assist me to fix it [INFO]: Checking for the Wasm target... error: Socket2 doesn't support the compile target error[E0432]: unresolved imports error[E0432]: unresolved imports |
@Tahmid-Hossen WASM is not supported, see #268. |
I'm trying to build using
wasm-pack build
and its giving me this error:I'm very new at this but it seems like its pulling down the latest version of the code in this repo and failing to compile.
Any help would be greatly appreciated.
The text was updated successfully, but these errors were encountered: