pkg.sopackage field notes

brew / 順位 5542

c2rust を Homebrew でインストール

c2rust のインストール経路、実行ファイル、メタデータ、AI エージェント向けセキュリティノートを確認します。

インストール

追加のインストールコマンド

macOS

Homebrew確認済み · 100%
brew install c2rust

provider-native install command

概要

パッケージ概要

Migrate C code to Rust

コマンドとエイリアス

  • c2rust
  • c2rust-transpile

履歴

プロジェクトの歴史と使われ方

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.

タイムライン

  • 2017-06-22: Upstream Git history begins with original C sources and Corrode-generated Rust sources.
  • 2018: README points to a RustConf 2018 talk introducing C2Rust.
  • 2018-11-02: 0.8.1 tag appears.
  • 2020-10-20: 0.15.0 tag appears.
  • 2023-02-01: v0.17.0 tag appears.
  • 2024-08-30: v0.19.0 tag appears.
  • 2025-02-24: v0.20.0 tag appears.
  • 2026-02-10: v0.22.1 tag appears.

Related projects

  • Corrode: an earlier C-to-Rust translator referenced in C2Rust's initial upstream history.
  • LLVM and clang/libclangTooling: parser and compilation-database infrastructure required by C2Rust.
  • c2rust-refactor: sibling tool for transforming generated Rust after transpilation.
  • Compiler Explorer: the README links an online C2Rust translator integration using the current master branch.

セキュリティ状態

リスクレベル: グリーン

narrow executable package without higher-risk signals.

リスク分類器

リスク グリーン · 信頼度 低 · appliance

理由

  • narrow executable package without higher-risk signals

信号

  • metadata:no-higher-risk-signals

インストール挙動

  • Homebrew bottle メタデータは記録されていません。

推奨レビュー

エージェントに無人実行させる前に、このツールが平文の認証情報を読むか、リモート状態を書き込むか、成果物を公開するか、プラグインを起動するかを確認してください。

実行可能ファイル

インストールされる実行可能ファイル

コマンド種類公開範囲メモ
c2rust実行可能ファイルインデックス済み実行可能ファイルローカル実行可能ファイルインデックスから検出されました。
c2rust-transpile実行可能ファイルインデックス済み実行可能ファイルローカル実行可能ファイルインデックスから検出されました。

鮮度

バージョンと鮮度

これらの信号は、ページ生成時期、パッケージマネージャの活動、上流リリース比較を分けて示します。バージョン遅れは、証拠 URL と比較可能なバージョンがある場合だけ警告されます。

ページ生成日2026-08-03
マネージャ版0.22.1
マネージャ更新日
ローカルデータ不明
上流利用不可
検出された最新未検出
  • OK鮮度警告は生成されていません。

インストールメタデータ

パッケージメタデータ

パッケージキーbrew:c2rust
バージョン0.22.1
パッケージマネージャHomebrew
ホームページhttps://c2rust.com/
リポジトリhttps://github.com/immunant/c2rust
Bottle未記録
サービス宣言なし

ソース経路

リポジトリデータから生成

このページは scripts/generate-pkg-sqlite.py が生成した非公開のパッケージ SQLite アーティファクトから av-web によって提供されます。

使用ソース

  • Geiger risk classifier
  • Nucleus package database
  • curated package history
  • pkgdb category and tag curation