-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Allow compiling uucore
with wasm32-unknown-unknown
#7840
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
base: main
Are you sure you want to change the base?
Allow compiling uucore
with wasm32-unknown-unknown
#7840
Conversation
related: nushell/nushell#15638 |
GNU testsuite comparison:
|
it would be nice to add a job in the CI to test this to make sure we don't regress in the future ? |
src/uu/dd/Cargo.toml
Outdated
@@ -21,7 +21,7 @@ path = "src/dd.rs" | |||
clap = { workspace = true } | |||
gcd = { workspace = true } | |||
libc = { workspace = true } | |||
uucore = { workspace = true, features = ["format", "parser", "quoting-style"] } | |||
uucore = { workspace = true, features = ["format", "parser", "quoting-style", "fs"] } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should make the Style/toml
job in the CI pass:
uucore = { workspace = true, features = ["format", "parser", "quoting-style", "fs"] } | |
uucore = { workspace = true, features = [ | |
"format", | |
"parser", | |
"quoting-style", | |
"fs", | |
] } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thx, I just run the formatter for me locally via "Event Better TOML" (a vscode extension) but npx --yes @taplo/cli fmt src\uu\dd\Cargo.toml
did not work for me for some reason. I'm on Windows.
I'm not sure how do this correctly, I tried this 3f4ff9b |
@sylvestre @cakebaker how do I properly test this? For |
GNU testsuite comparison:
|
just build it, no need to run the tests for now |
I added a new job to handle building for WASM, including it inside the main build job felt overly complicated |
GNU testsuite comparison:
|
Why limiting the wasm CI build to only uucore? |
GNU testsuite comparison:
|
I just added everything that currently compiles to WASM to the CI but I don't know if that is so great too. The |
GNU testsuite comparison:
|
thanks! However, building all coreutils with a simple cargo build --target wasm --features unix is probably good enough :) |
The problem I have here is that wasm is not unix, also I don't expect everything to work. So I don't really know what we want to run here. So what should I do? I have no problem doing work on the CI but I don't know what exactly we want here. |
match what is done elsewhere :) |
How should I handle the "Package" and "Publish" steps?
|
GNU testsuite comparison:
|
just ignore these steps :) |
GNU testsuite comparison:
|
I think the mac build got stuck somehow |
Older versions of
uucore
could be compiled withwasm32-unknown-unknown
. But insideuucore::mods::io
are file handles used which only exist when you have a filesystem which wasm doesn't have. So I feature gated them behindfs
. I cannot really run the tests on my machine as my german operating system doesn't report english error messages.