riscv64gc musl build support
What variant of Codex are you using?
CLI
What feature would you like to see?
Add a target-specific dependency table for riscv64gc-unknown-linux-musl that enables the openssl-sys vendored feature, mirroring the existing x86_64 and AArch64 musl tables.
(https://github.com/cpprust/codex/tree/add-riscv64-musl-openssl)
$ git diff main add-riscv64-musl-openssl
diff --git a/codex-rs/core/Cargo.toml b/codex-rs/core/Cargo.toml
index ff683fb5f9..73599f792a 100644
--- a/codex-rs/core/Cargo.toml
+++ b/codex-rs/core/Cargo.toml
@@ -134,6 +134,10 @@ openssl-sys = { workspace = true, features = ["vendored"] }
[target.aarch64-unknown-linux-musl.dependencies]
openssl-sys = { workspace = true, features = ["vendored"] }
+# Build OpenSSL from source for musl builds.
+[target.riscv64gc-unknown-linux-musl.dependencies]
+openssl-sys = { workspace = true, features = ["vendored"] }
+
[target.'cfg(unix)'.dependencies]
codex-shell-escalation = { workspace = true }
Additional information
Successfully cross compile on x86_64 fedora after that fix, tested on OrangePi RV2 with 7.1.5-201.0.riscv64.omni.fc44.riscv64.
Compile on x86_64 pc
$ uname -a
Linux ferris 7.1.7-200.fc44.x86_64 #1 SMP PREEMPT_DYNAMIC Thu Aug 6 21:13:02 UTC 2026 x86_64 GNU/Linux
$ cargo zigbuild -r --target riscv64gc-unknown-linux-musl --package codex-cli --bin codex
...
Finished release profile [optimized + debuginfo] target(s) in 0.44s
$ file target/riscv64gc-unknown-linux-musl/release/codex
target/riscv64gc-unknown-linux-musl/release/codex: ELF 64-bit LSB pie executable, UCB RISC-V, RVC, double-float ABI, version 1 (SYSV), static-pie linked, with debug_info, not stripped
$ ldd target/riscv64gc-unknown-linux-musl/release/codex
not a dynamic executable
Run on riscv64 pc
$ uname -a
Linux fungus 7.1.5-201.0.riscv64.omni.fc44.riscv64 #2 SMP PREEMPT_DYNAMIC Fri Aug 14 18:59:13 CST 2026 riscv64 GNU/Linux
$ codex
╭─────────────────────────────────────────────────╮
│ >_ OpenAI Codex (v0.0.0) │
│ │
│ model: gpt-5.6-sol xhigh /model to change │
│ directory: ~ │
╰─────────────────────────────────────────────────╯
Tip: This is a test announcement
$