awesome-repositories.com
Blog
awesome-repositories.com

Entdecke die besten Open-Source-Repositories mit KI-gestützter Suche.

EntdeckenKuratierte SuchenOpen-Source-AlternativenSelf-hosted SoftwareBlogSitemap
ProjektÜber unsRanking-MethodikPresseMCP-Server
RechtlichesDatenschutzAGB
© 2026 Bringes Technology SRL·VAT RO45896025·hello@awesome-repositories.com
·
immunant avatar

immunant/c2rust

0
View on GitHub↗
4,642 Stars·293 Forks·Rust·other·4 Aufrufec2rust.com↗

C2rust

c2rust is a source-to-source translation suite and C-to-Rust transpiler designed to convert C source code and libraries into functionally equivalent unsafe Rust code. It operates as a pipeline that preserves original behavior and data structures, producing translated code that compiles as compatible shared libraries or Rust crates.

The system includes an automated Rust refactoring framework that uses pattern-based AST rewriting to transform unsafe Rust into safe, idiomatic constructs. It utilizes an ownership inference engine to determine when raw pointers can be converted into safe references or owned values, and it generates byte-compatible bitfield structs with typed accessors.

To ensure correctness, the project provides cross-execution verification tools that instrument binaries to detect state discrepancies and verify execution parity at the function-call level. The suite also covers structural refactoring, automated type error correction, and the generation of build files and crate directories for the translated output.

Features

  • C Library Migration Tools - Translates complete C library source trees into compatible Rust crates with build configurations and external binding management.
  • Semantic-Preserving Transpilers - Converts C constructs into functionally equivalent unsafe Rust code to ensure initial behavioral parity.
  • Source-To-Source Transpilers - Provides a comprehensive pipeline for transpiling C libraries into Rust crates.
  • AST-Based Source Transformations - Matches syntax tree nodes against templates to perform targeted automated transformations and structural code changes.
  • Automated Rust Refactoring Frameworks - Provides a pattern-based AST rewriting engine that transforms unsafe Rust code into safe and idiomatic constructs.
  • Refactoring Tools - Rewrites translated unsafe code into idiomatic patterns using specialized refactoring tools to improve safety.
  • Library Transpilation - Converts complete C library source trees into equivalent Rust code that compiles as shared libraries.
  • C-to-Rust Transpilers - Translates C source code into functionally equivalent unsafe Rust code while preserving original behavior and data structures.
  • Crate Generators - Produces a full project directory including build scripts and metadata from original source code.
  • Unsafe Block Elimination - Eliminates unsafe blocks from source code while preserving original functionality to ensure full safety.
  • Safe Pointer Type Conversions - Transforms unsafe raw pointer types into safe array or reference types that include bounds checking.
  • Structural Pattern Matching - Parses pattern strings into syntax fragments and matches them against source code to extract transformation bindings.
  • AST-Based Refactorers - Uses pattern-based syntax tree matching and rewriting to perform bulk transformations on source code.
  • Safe FFI Substitutions - Replaces calls to external functions and macros with safe library wrappers or standard equivalents.
  • Pattern-Based Replacements - Replaces matched statements or expressions with new syntax produced by a callback or a pattern template.
  • Ownership Inference Engines - Analyzes raw pointer usage to determine which should become safe references or owned values in the translated code.
  • Unsafe to Safe Rust Refactoring - Rewrites automatically translated unsafe Rust into safer, more idiomatic constructs using pattern-based transformations and ownership inference.
  • Ownership Inference Engines - Deno Bitfield analyzes raw pointers in translated code to determine which should become safe references or owned values.
  • Behavioral Equivalence Checkers - Compares the execution of C and Rust code versions at the function-call level.
  • Cross-Execution Instrumentations - Inserts runtime checks into both source and translated binaries to compare function-level execution behavior and state.
  • Parity Test Suites - Verifies identical behavior across different language implementations by comparing compiled binaries.
  • Foreign Declaration Management - Replaces foreign declarations with internal definitions and standardizes external references by merging duplicates.
  • Byte-Compatible Struct Generators - Generates byte-compatible Rust structs with typed getters and setters to match C bit-fields.
  • Cross-Check Hashing Algorithms - Uses type-aware hashing that ignores padding and dereferences pointers for consistent state comparison.
  • Automated Type Fixes - Applies type patterns to automatically resolve and fix type errors found within the code.
  • Build System Templates - Creates project configuration files for libraries or binaries to support the compilation of transpiled source files.
  • Build Configuration File Generators - Creates project configuration files for translated code to compile as a library or binary.
  • Semantic-Preserving Unsafe Conversions - Translates C constructs into functionally equivalent unsafe Rust code that maintains original test suite results.
  • Byte-Compatible Bitfield Generators - Generates Rust structs with typed accessors that maintain identical memory layouts to C bit-fields.
  • Type and Data Restructuring - Converts functions to methods and unions to enums while adjusting binary interfaces for compatibility.
  • Struct Property Accessors - Generates typed getter and setter methods for bit-level fields in Rust structures.
  • Type Conversion and Casting - Changes types for variables and arguments and propagates these adjustments using casts or conversion functions.
  • Type-Safe Formatting Conversions - Replaces variadic formatting calls with type-safe macros to eliminate unsafe string operations.
  • Global State Migration Tools - Gathers global mutable statics into a single structure and passes it by reference to enable safety checks.
  • Translation Parity Validations - Runs original test suites against compiled Rust output to confirm behavioral equivalence with the original C code.
  • Type-Aware Memory Hashing - Processes memory values using algorithms that ignore padding and dereference pointers to ensure consistent behavioral comparison.
  • Developer Tools - Translates C code to Rust using Clang/LLVM.
  • Transpilation - Translator for converting C code to Rust.

Star-Verlauf

Star-Verlauf für immunant/c2rustStar-Verlauf für immunant/c2rust

KI-Suche

Entdecke weitere awesome Repositories

Beschreibe in einfachen Worten, was du brauchst — die KI bewertet tausende kuratierte Open-Source-Projekte nach Relevanz.

Start searching with AI

Open-Source-Alternativen zu C2rust

Ähnliche Open-Source-Projekte, sortiert nach der Anzahl der gemeinsamen Funktionen mit C2rust.
  • facebookarchive/codemodAvatar von facebookarchive

    facebookarchive/codemod

    4,133Auf GitHub ansehen↗

    Codemod is a set of software tools for performing structural source code transformations. It functions as an automated codebase migration tool that utilizes abstract syntax tree manipulations rather than simple regular expressions to execute large-scale refactors across multiple files. The project distinguishes itself through an interactive transformation interface that provides colored diffs, allowing users to manually review, accept, or modify each match. It also supports a distributed refactoring workflow, which enables the segmentation of a codebase into assigned work blocks to divide mig

    Python
    Auf GitHub ansehen↗4,133
  • openrewrite/rewriteAvatar von openrewrite

    openrewrite/rewrite

    3,312Auf GitHub ansehen↗

    OpenRewrite is an automated refactoring engine and source-to-source migration framework. It uses a lossless semantic tree parser to represent source code as type-aware trees that preserve original whitespace and formatting, enabling precise and deterministic modifications. The project utilizes a declarative refactoring pipeline where sequences of transformations are defined in YAML to resolve breaking changes and technical debt. It features type-aware pattern matching and cross-language model mapping to apply similar refactoring patterns across different programming languages. The framework

    Javaabstract-syntax-treeastcode-search
    Auf GitHub ansehen↗3,312
  • rollup/pluginsAvatar von rollup

    rollup/plugins

    3,750Auf GitHub ansehen↗

    This is a collection of official extensions for the Rollup bundling process. These plugins serve as module transformers, resolution managers, and bundle optimizers designed to modify how JavaScript modules are processed, resolved, and optimized. The suite provides specialized capabilities for modern web transpilation, converting TypeScript, JSX, Flow, and GraphQL into compatible JavaScript. It distinguishes itself through extensive non-JavaScript asset integration, allowing the import of JSON, YAML, CSV, and image files as JavaScript modules or data URIs, and providing support for bundling We

    JavaScriptpluginsrolluprollup-plugins
    Auf GitHub ansehen↗3,750
  • airbnb/ts-migrateAvatar von airbnb

    airbnb/ts-migrate

    5,620Auf GitHub ansehen↗

    ts-migrate is an automated migration tool designed to transform JavaScript source code into compiling TypeScript files. It functions as a code migration framework that uses abstract syntax trees to perform large-scale refactoring and structural changes across a project. The tool provides a customizable framework for defining plugin-based transformation rules, allowing for the automation of specific code changes. It includes specialized engines for converting JSDoc type definitions into native TypeScript annotations and a utility for suppressing compiler errors by inserting type assertions or

    TypeScriptcodemodjavascriptmigration
    Auf GitHub ansehen↗5,620
Alle 30 Alternativen zu C2rust anzeigen→

Häufig gestellte Fragen

Was macht immunant/c2rust?

c2rust is a source-to-source translation suite and C-to-Rust transpiler designed to convert C source code and libraries into functionally equivalent unsafe Rust code. It operates as a pipeline that preserves original behavior and data structures, producing translated code that compiles as compatible shared libraries or Rust crates.

Was sind die Hauptfunktionen von immunant/c2rust?

Die Hauptfunktionen von immunant/c2rust sind: C Library Migration Tools, Semantic-Preserving Transpilers, Source-To-Source Transpilers, AST-Based Source Transformations, Automated Rust Refactoring Frameworks, Refactoring Tools, Library Transpilation, C-to-Rust Transpilers.

Welche Open-Source-Alternativen gibt es zu immunant/c2rust?

Open-Source-Alternativen zu immunant/c2rust sind unter anderem: openrewrite/rewrite — OpenRewrite is an automated refactoring engine and source-to-source migration framework. It uses a lossless semantic… facebookarchive/codemod — Codemod is a set of software tools for performing structural source code transformations. It functions as an automated… rollup/plugins — This is a collection of official extensions for the Rollup bundling process. These plugins serve as module… airbnb/ts-migrate — ts-migrate is an automated migration tool designed to transform JavaScript source code into compiling TypeScript… reactjs/react-codemod — This project is a suite of abstract syntax tree transformation tools designed to automate the migration of source code… rust-lang/rust-bindgen — Rust-bindgen is a build-time foreign function interface binding generator and C header parser designed to automate…