macOS
brew install c2rustlocal Homebrew formula metadata
brew
c2rust のインストール経路、実行ファイル、メタデータ、AI エージェント向けセキュリティノートを確認します。
インストール
brew install c2rustlocal Homebrew formula metadata
sudo apk add c2rustAlpine Linux edge package indexes · c2rust · ソース: dl-cdn.alpinelinux.org
概要
Migrate C code to Rust
履歴
C2Rust is a C99-to-Rust migration toolkit. Its core transpiler produces unsafe Rust that closely mirrors the original C so functionality and tests can be preserved before humans or refactoring tools gradually improve the Rust.
The upstream Git history begins on 22 June 2017 with original C sources, Corrode-generated Rust sources, and early source-rewriting work. The README describes the project's goal as helping migrate C99-compliant code to Rust while preserving behavior first.
By the time of the README's RustConf 2018 reference, C2Rust had become a visible example of pragmatic Rust adoption for existing C codebases. The project grew beyond raw transpilation to include cross-checking translated code against the original and a refactoring tool intended to reduce the manual work of turning unsafe Rust into safer, more idiomatic Rust.
C2Rust is packaged both as a Rust crate installed with `cargo install --locked c2rust` and through system package managers such as Homebrew and Alpine according to source_facts. The README also documents direct Git installation for users needing unreleased bug fixes.
Adoption is mostly by developers facing migration or audit work rather than everyday end users. Its requirement for LLVM/clang, compile_commands.json, and close build-system integration places it in the serious-codebase-migration category.
For non-trivial projects, C2Rust expects a `compile_commands.json` compilation database so libclangTooling can see the same compiler arguments used by the original C build. Users run `c2rust transpile path/to/compile_commands.json`, optionally emitting Cargo build files or specifying binary entry points.
The README also documents trivial source-file transpilation, cross-checking translated code against the original, and `c2rust refactor` tooling for follow-up transformations. Developers often need LLVM_CONFIG_PATH or related environment variables when building against specific LLVM installs.
C2Rust is significant because it packages one of the hard parts of language migration as a CLI workflow: consume a C build database, produce Rust, run tests, then iterate. It is not magic safe Rust generation; its value is making the first migration step mechanical and reproducible.
It also represents a Rust ecosystem pattern where package-manager installation is only the entry point. Real use depends on compiler toolchains, build-system metadata, test suites, and sometimes pinned nightly Rust components for advanced refactoring tools.
セキュリティ状態
narrow executable package without higher-risk signals.
リスク グリーン · 信頼度 低 · appliance
エージェントに無人実行させる前に、このツールが平文の認証情報を読むか、リモート状態を書き込むか、成果物を公開するか、プラグインを起動するかを確認してください。
実行可能ファイル
| コマンド | 種類 | 公開範囲 | メモ |
|---|---|---|---|
c2rust | cli | グローバル実行可能ファイル | |
c2rust-transpile | cli | グローバル実行可能ファイル |
鮮度
これらの信号は、ページ生成時期、パッケージマネージャの活動、上流リリース比較を分けて示します。バージョン遅れは、証拠 URL と比較可能なバージョンがある場合だけ警告されます。
https://github.com/immunant/c2rust
インストールメタデータ
| パッケージキー | brew:c2rust |
|---|---|
| バージョン | 0.22.1 |
| パッケージマネージャ | Homebrew |
| パッケージマネージャページ | https://formulae.brew.sh/formula/c2rust |
| ホームページ | https://c2rust.com/ |
| リポジトリ | https://github.com/immunant/c2rust |
| 上流ドキュメント | https://c2rust.com/manual |
| ライセンス | BSD-3-Clause |
| ソースアーカイブ | https://github.com/immunant/c2rust/archive/refs/tags/v0.22.1.tar.gz |
| 依存関係 | llvm@21 |
| ビルド依存関係 | cmake, rust |
| Bottle | 利用可能 (対象 arm64_linux, arm64_sequoia, arm64_sonoma, arm64_tahoe, sonoma, x86_64_linux) |
| Homebrew post-install | 未定義 |
| サービス | 宣言なし |
レジストリ情報
| Source Database | Homebrew formula API |
|---|---|
| Tap | homebrew/core |
| Full Name | c2rust |
| Version Scheme | 0 |
| Revision | 1 |
| Bottle Stable Root URL | https://ghcr.io/v2/homebrew/core |
| Deprecated | no |
| Disabled | no |
| Keg Only | no |
| URL Keys |
|
ソースデータベース一致
一致は外部パッケージマネージャインデックスから取得され、ローカルの Automic Vault パッケージリンクとは分けて表示されます。
c2rust 0.22.1-r0
Transpile C99-compliant code to (unsafe) Rust code
https://github.com/immunant/c2rust
sudo apk add c2rustソース経路
このページは scripts/generate-pkg-sqlite.py が生成した非公開のパッケージ SQLite アーティファクトから av-web によって提供されます。
View the package source record on GitHub.