Uh oh!
There was an error while loading. Please reload this page.
Add built-in support for *-linux-none targets - #618
Conversation
| ); | ||
| } | ||
| } | ||
| } else if #[cfg(all(target_os = "linux", target_env = ""))] { |
There was a problem hiding this comment.
Technically, we only have the x86_64-unknown-linux-none target, but to future-proof ourselves I think it's fine to use a more general cfg.
Theoretically, it's possible that a new linux-none target will be added for a target_arch which is not supported by linux_raw, but I think probability of it is really low and it can be safely ignored.
josephlr
left a comment
There was a problem hiding this comment.
This looks reasonable, but should we add tests for this? I'm not sure if it's possible to build a x86_64-unknown-linux-none binary yet, but we could at least add a tier3 build test
josephlr
commented
Mar 9, 2025
We should also update the supported targets list in lib.rs, if you think this target deserves its own entry. |
josephlr
left a comment
There was a problem hiding this comment.
Looks good, thanks!
I'd assume at this point there's no way to create a binary for x86_64-unknown-linux-none using rustix, so it's not possible to test right now?
newpavlov
commented
Mar 9, 2025
IIUC it should be possible to create an executable binary, but we would need to deal with the entry point ourselves. I think the existing |
### Added - `efi_rng` opt-in backend [#570] - `linux_raw` opt-in backend [#572] - `.cargo/config.toml` example in the crate-level docs [#591] - `getrandom_test_linux_without_fallback` configuration flag to test that file fallback is not triggered in the `linux_android_with_fallback` backend [#605] - Built-in support for `*-linux-none` targets [#618] - Cygwin support [#626] ### Changed - Update `wasi` dependency to v0.14 [#594] - Add `#[inline]` attribute to the inner functions [#596] - Update WASI and Emscripten links in the crate-level docs [#597] - Do not use `dlsym` on MUSL targets in the `linux_android_with_fallback` backend [#602] - Remove `linux_android.rs` and use `getrandom.rs` instead [#603] - Always use `RtlGenRandom` on Windows targets when compiling with pre-1.78 Rust [#610] - Internal representation of the `Error` type [#614] - Remove `windows-targets` dependency and use [`raw-dylib`] directly [#627] ### Removed - `Error::INTERNAL_START` and `Error::CUSTOM_START` associated constants [#614] [#570]: #570 [#572]: #572 [#591]: #591 [#594]: #594 [#596]: #596 [#597]: #597 [#602]: #602 [#603]: #603 [#605]: #605 [#610]: #610 [#614]: #614 [#618]: #618 [#626]: #626 [#627]: #627 [`raw-dylib`]: https://doc.rust-lang.org/reference/items/external-blocks.html?highlight=link#dylib-versus-raw-dylib
### Added - `efi_rng` opt-in backend [rust-random#570] - `linux_raw` opt-in backend [rust-random#572] - `.cargo/config.toml` example in the crate-level docs [rust-random#591] - `getrandom_test_linux_without_fallback` configuration flag to test that file fallback is not triggered in the `linux_android_with_fallback` backend [rust-random#605] - Built-in support for `*-linux-none` targets [rust-random#618] - Cygwin support [rust-random#626] ### Changed - Update `wasi` dependency to v0.14 [rust-random#594] - Add `#[inline]` attribute to the inner functions [rust-random#596] - Update WASI and Emscripten links in the crate-level docs [rust-random#597] - Do not use `dlsym` on MUSL targets in the `linux_android_with_fallback` backend [rust-random#602] - Remove `linux_android.rs` and use `getrandom.rs` instead [rust-random#603] - Always use `RtlGenRandom` on Windows targets when compiling with pre-1.78 Rust [rust-random#610] - Internal representation of the `Error` type [rust-random#614] - Remove `windows-targets` dependency and use [`raw-dylib`] directly [rust-random#627] ### Removed - `Error::INTERNAL_START` and `Error::CUSTOM_START` associated constants [rust-random#614] [rust-random#570]: rust-random#570 [rust-random#572]: rust-random#572 [rust-random#591]: rust-random#591 [rust-random#594]: rust-random#594 [rust-random#596]: rust-random#596 [rust-random#597]: rust-random#597 [rust-random#602]: rust-random#602 [rust-random#603]: rust-random#603 [rust-random#605]: rust-random#605 [rust-random#610]: rust-random#610 [rust-random#614]: rust-random#614 [rust-random#618]: rust-random#618 [rust-random#626]: rust-random#626 [rust-random#627]: rust-random#627 [`raw-dylib`]: https://doc.rust-lang.org/reference/items/external-blocks.html?highlight=link#dylib-versus-raw-dylib
cc @briansmith