openai / openai/codex

riscv64gc musl build support

Open Beginner friendly
#38,718 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

CLI enhancement
Dominant language
Rust
Stars
125k
Forks
19.5k
PR merge metrics
PR metrics pending

Description

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
$

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in codex-rs/core/Cargo.toml, reading the existing x86_64 and AArch64 musl target dependency tables. Run the reported cargo zigbuild command for riscv64gc-unknown-linux-musl and confirm the codex-cli binary builds successfully with OpenSSL vendored, matching the reported static executable result.

Written by the indexing model from the issue text.

Assessment

Tech stack
linux, rust
Domain
build-system
Issue type
Feature
Difficulty
1/5
Estimated time
Under an hour
Activity status
Quiet
Clarity
Clearly specified
Newbie friendliness
85/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.