build from source fails with "let" expression errors.
Resolved 💬 1 comment Opened Aug 28, 2025 by Tor-Saxberg Closed Aug 28, 2025
What version of Codex is running?
0.25.0
Which model were you using?
gpt-5
What platform is your computer?
Darwin 24.5.0 arm64 arm
What steps can reproduce the bug?
follow the documentation to build from source:
# Clone the repository and navigate to the root of the Cargo workspace.
git clone https://github.com/openai/codex.git
cd codex/codex-rs
# Install the Rust toolchain, if necessary.
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
source "$HOME/.cargo/env"
rustup component add rustfmt
rustup component add clippy
# Build Codex.
cargo build
What is the expected behavior?
it runs correctly.
What do you see instead?
Compiling rustls-pki-types v1.12.0
Compiling darling_core v0.20.11
Compiling num-bigint v0.4.6
error[E0658]: `let` expressions in this position are unstable
--> protocol/src/protocol.rs:340:24
|
340 | && let Some(tmpdir) = std::env::var_os("TMPDIR")
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: see issue #53667 <https://github.com/rust-lang/rust/issues/53667> for more information
Compiling rand v0.8.5
Compiling hyper-tls v0.6.0
...
Compiling darling_macro v0.20.11
Compiling tiny_http v0.12.0
For more information about this error, try `rustc --explain E0658`.
error: could not compile `codex-protocol` (lib) due to 1 previous error
warning: build failed, waiting for other jobs to finish...This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗