mirror of
https://github.com/shadowsocks/shadowsocks-rust.git
synced 2026-10-11 21:39:51 +00:00
NetBSD 9 (used by cross-rs's x86_64-unknown-netbsd image) lacks the getentropy symbol that aws-lc-sys references. getentropy/getrandom were only added in NetBSD 10.0. Add a Cross.toml pre-build hook that compiles a small static shim implementing getentropy via sysctl(CTL_KERN, KERN_ARND) -- the same mechanism NetBSD 9's own arc4random uses internally. The shim is made available to the linker through target-specific RUSTFLAGS.
Build Standalone Binaries
Build with cross
- Install
cross
cargo install cross
- Build with cross
cross build --target x86_64-unknown-linux-musl
Predefined build routines
build-release: Build binaries withcrossand packages outputs intoreleasefolderbuild-host-release: Build binaries with host's Rust toolchain. *NIX shell scriptbuild-host-release.ps1: Build binaries with host's Rust toolchain. PowerShell script