Automic VaultAutomic Vault

brew

c2rust mit Homebrew, apk installieren

Prüfe Installationswege, Executables, Metadaten und Sicherheitshinweise für c2rust in AI-Agent-Workflows.

Installation

Weitere Installationsbefehle

macOS

Homebrewverifiziert · 100%
brew install c2rust

local Homebrew formula metadata

Überblick

Paketzusammenfassung

Migrate C code to Rust

Befehle und Aliase

  • c2rust
  • c2rust-transpile

Verlauf

Projektgeschichte und Nutzung

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.

Projektgeschichte

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.

Adoptionsgeschichte

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.

Wie es verwendet wird

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.

Warum Paket-Nerds sich dafür interessieren

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.

Zeitleiste

  • 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.

Sicherheitslage

Risikostufe: grün

narrow executable package without higher-risk signals.

Risikoklassifikator

grün Risiko · niedrig Konfidenz · appliance

Warum

  • narrow executable package without higher-risk signals

Signale

  • metadata:no-higher-risk-signals

Installationsverhalten

  • In den Formelmetadaten ist kein Homebrew-Post-install-Hook erfasst.
  • Homebrew-Bottle-Metadaten sind für 6 Plattformziele verfügbar.
  • Installiert mit 1 Laufzeitabhängigkeiten.
  • Build-Metadaten listen 2 Build-Abhängigkeiten.

Empfohlene Prüfung

Prüfe vor unbeaufsichtigter Agent-Nutzung, ob das Tool Klartext-Credentials liest, Remote-Zustand schreibt, Artefakte veröffentlicht oder Plugins ausführt.

Executables

Installierte Executables

BefehlArtSichtbarkeitHinweis
c2rustcliglobales Executable
c2rust-transpilecliglobales Executable

Aktualität

Version und Aktualität

Diese Signale trennen das Alter der Seitengenerierung, Aktivität des Paketmanagers und Upstream-Release-Vergleich. Versionsrückstand wird nur gemeldet, wenn eine Evidenz-URL und vergleichbare Versionen vorhanden sind.

Seite generiert2026-07-10
Manager-Version0.22.1
Manager aktualisiert
lokale DatenOK
Upstreamaktuell
neueste erkannte Versionv0.22.1

https://github.com/immunant/c2rust

  • InfoNo package-manager update timestamp was available.niedrig Konfidenz

Installationsmetadaten

Paketmetadaten

Paketschlüsselbrew:c2rust
Version0.22.1
PaketmanagerHomebrew
Paketmanager-Seitehttps://formulae.brew.sh/formula/c2rust
Homepagehttps://c2rust.com/
Repositoryhttps://github.com/immunant/c2rust
Upstream-Dokumentationhttps://c2rust.com/manual
LizenzBSD-3-Clause
Quellarchivhttps://github.com/immunant/c2rust/archive/refs/tags/v0.22.1.tar.gz
Abhängigkeitenllvm@21
Build-Abhängigkeitencmake, rust
Bottleverfügbar (auf arm64_linux, arm64_sequoia, arm64_sonoma, arm64_tahoe, sonoma, x86_64_linux)
Homebrew post-installnicht definiert
Dienstkeiner deklariert

Registry-Fakten

Details aus der Quelldatenbank

Source DatabaseHomebrew formula API
Taphomebrew/core
Full Namec2rust
Version Scheme0
Revision1
Bottle Stable Root URLhttps://ghcr.io/v2/homebrew/core
Deprecatedno
Disabledno
Keg Onlyno
URL Keys
  • stable

Source-Datenbank-Treffer

Andere Paketmanager-Einträge

Treffer stammen aus externen Paketmanager-Indizes und bleiben von lokalen Automic-Vault-Paketlinks getrennt.

apk95%

c2rust 0.22.1-r0

Transpile C99-compliant code to (unsafe) Rust code

https://github.com/immunant/c2rust

sudo apk add c2rust
  • License: BSD-3-Clause
  • Architecture: x86_64
  • Source Package: c2rust
  • 1 Abhängigkeiten
  • 1 stellt bereit
  • normalized package name match
  • Abgeglichen nach: C2rust
Alpine Linux edge package indexes · dl-cdn.alpinelinux.org · Alpine Linux edge package indexes: c2rust from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz

Quellspur

Aus Repository-Daten generiert

Diese Seite wird von av-web aus dem privaten Paket-SQLite-Artefakt bereitgestellt, das scripts/generate-pkg-sqlite.py erstellt.

Verwendete Quellen

  • Geiger risk classifier
  • Nucleus package database
  • av.db category and tag curation
  • cross-ecosystem install command graph
  • curated package history
  • external package-manager database matches
  • package relationship graph
  • package version freshness
  • package-page enrichment