Skip to content

system constants in Rust are decided at compile time #3

@Jules-Bertholet

Description

@Jules-Bertholet

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 the libc crate uses (via #[cfg(..)]) to determine what it thinks the values of these constants is. Naturally, these will match only on Linux platforms, so libc's dependents, including std, will be broken everywhere else.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions