Add Rust install instructions and pre-commit cargo build hook

This commit is contained in:
Rai (Michael Pokorny)
2025-06-24 16:07:27 -07:00
parent e73d97acf1
commit 056f818002
2 changed files with 19 additions and 2 deletions

View File

@@ -6,4 +6,10 @@ repos:
entry: python3 agentydragon/tools/check_task_frontmatter.py
language: python
additional_dependencies: [PyYAML]
files: ^agentydragon/tasks/[0-9]{2}-.*\.md$
files: ^agentydragon/tasks/[0-9]{2}-.*\.md$
- id: cargo-build
name: Check Rust workspace builds
entry: bash -lc 'cd codex-rs && cargo build --workspace --locked'
language: system
pass_filenames: false
require_serial: true

View File

@@ -11,8 +11,19 @@ npm i -g @openai/codex@native
codex
```
You can also download a platform-specific release directly from our [GitHub Releases](https://github.com/openai/codex/releases).
You can also build and install the Rust-native binary from source:
```shell
cargo install --path cli --locked
```
By default this installs into `$HOME/.cargo/bin`, so make sure that's on your `PATH`. To install system-wide (e.g. to `/usr/local`), run:
```shell
sudo cargo install --path cli --locked --root /usr/local
```
You can also download a platform-specific release directly from our [GitHub Releases](https://github.com/openai/codex/releases).
## What's new in the Rust CLI
While we are [working to close the gap between the TypeScript and Rust implementations of Codex CLI](https://github.com/openai/codex/issues/1262), note that the Rust CLI has a number of features that the TypeScript CLI does not!