-
Notifications
You must be signed in to change notification settings - Fork 12
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
system constants in Rust are decided at compile time #3
Comments
Thanks for the note! For my reference, can you link to the part of the libc crate source that actually decides the system constants? I'd like to know that the fat binary would work on x86-64 linux and aarch64 linux, because those are the |
They are split across many different files, each platform has its own. You can search for them individually: |
I just want to link to one of them so I can say the APE is for x86-64 linux and aarch64-linux. Is it possible for the system constants to be |
I shall link to https://github.com/search?q=repo%3Arust-lang%2Flibc%20EINVAL&type=code showing that Rust constants are decided at compile-time. |
Updated the README. Thanks for the heads up! |
Even if you fix that, IIRC some widely used crates outside |
In Cosmopolitan, the values of many system constants (syscalls, errno, etc) are different for different systems and only available at runtime. The Rust target definition in this repo specifies
"os":"linux", "env": "musl"
, which is what thelibc
crate uses (via#[cfg(..)]
) to determine what it thinks the values of these constants is. Naturally, these will match only on Linux platforms, solibc
's dependents, includingstd
, will be broken everywhere else.The text was updated successfully, but these errors were encountered: