Commit Graph
3 Commits
Author SHA1 Message Date
Josh McKinney c67908ba17 style: reformat imports granularity to module
Choosing module granularity over item granularity is based on a similar
choice made in the standard library to balance readabilty, with easy to
read diffs.

This saves 2098 lines or about 33% of the lines spent writing imports.
This is beneficial to both human readers who have to scroll past large
import blocks when reading a file as well as codex which shouldn't have
to add as many tokens to its context.

Manual changes to rustfmt.toml, rust-ci.yml, justfile, docs/contributing
and docs/install. The actual format commit is intentionally in a second
commit to make it easier to rebase this PR as main moves (drop the
next commit and re-run cargo +nightly fmt).

Added cargo nightly to the ci and justfile. In theory this is unstable,
but in real world use this tends to hit a problems perhaps once every
6 months. The fix is usually fairly easy (pin a version briefly), and
the problems tend to be fixed pretty quickly.
2025-11-05 17:33:16 -08:00
jcoens-openai 8a89d3aeda Update cargo to 2024 edition (#842)
Some effects of this change:
- New formatting changes across many files. No functionality changes
should occur from that.
- Calls to `set_env` are considered unsafe, since this only happens in
tests we wrap them in `unsafe` blocks
2025-05-07 08:37:48 -07:00
Michael Bolin 31d0d7a305 feat: initial import of Rust implementation of Codex CLI in codex-rs/ (#629)
As stated in `codex-rs/README.md`:

Today, Codex CLI is written in TypeScript and requires Node.js 22+ to
run it. For a number of users, this runtime requirement inhibits
adoption: they would be better served by a standalone executable. As
maintainers, we want Codex to run efficiently in a wide range of
environments with minimal overhead. We also want to take advantage of
operating system-specific APIs to provide better sandboxing, where
possible.

To that end, we are moving forward with a Rust implementation of Codex
CLI contained in this folder, which has the following benefits:

- The CLI compiles to small, standalone, platform-specific binaries.
- Can make direct, native calls to
[seccomp](https://man7.org/linux/man-pages/man2/seccomp.2.html) and
[landlock](https://man7.org/linux/man-pages/man7/landlock.7.html) in
order to support sandboxing on Linux.
- No runtime garbage collection, resulting in lower memory consumption
and better, more predictable performance.

Currently, the Rust implementation is materially behind the TypeScript
implementation in functionality, so continue to use the TypeScript
implmentation for the time being. We will publish native executables via
GitHub Releases as soon as we feel the Rust version is usable.
2025-04-24 13:31:40 -07:00