{"id":13436615,"url":"https://github.com/corrosion-rs/corrosion","last_synced_at":"2025-12-11T23:09:49.716Z","repository":{"id":37486721,"uuid":"124290783","full_name":"corrosion-rs/corrosion","owner":"corrosion-rs","description":"Marrying Rust and CMake - Easy Rust and C/C++ Integration!","archived":false,"fork":false,"pushed_at":"2025-04-23T18:24:33.000Z","size":834,"stargazers_count":1232,"open_issues_count":60,"forks_count":117,"subscribers_count":13,"default_branch":"master","last_synced_at":"2025-04-23T19:37:16.411Z","etag":null,"topics":["build-system","build-systems","build-tool","c","cargo","cmake","cmake-cargo","cplusplus","cpp","cross-compilation","rust"],"latest_commit_sha":null,"homepage":"https://corrosion-rs.github.io/corrosion/","language":"CMake","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/corrosion-rs.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null},"funding":{"github":["jschwe"]}},"created_at":"2018-03-07T20:30:02.000Z","updated_at":"2025-04-23T19:32:28.000Z","dependencies_parsed_at":"2023-02-16T16:45:40.611Z","dependency_job_id":"4e8f8e3a-120b-4e4b-8033-0e87ff1f5aba","html_url":"https://github.com/corrosion-rs/corrosion","commit_stats":{"total_commits":599,"total_committers":49,"mean_commits":"12.224489795918368","dds":"0.42904841402337224","last_synced_commit":"3985d57e03acb99f1e6089fa51d072c285827b29"},"previous_names":["andrewgaspar/corrosion"],"tags_count":31,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/corrosion-rs%2Fcorrosion","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/corrosion-rs%2Fcorrosion/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/corrosion-rs%2Fcorrosion/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/corrosion-rs%2Fcorrosion/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/corrosion-rs","download_url":"https://codeload.github.com/corrosion-rs/corrosion/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254092655,"owners_count":22013290,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["build-system","build-systems","build-tool","c","cargo","cmake","cmake-cargo","cplusplus","cpp","cross-compilation","rust"],"created_at":"2024-07-31T03:00:50.730Z","updated_at":"2025-12-11T23:09:49.653Z","avatar_url":"https://github.com/corrosion-rs.png","language":"CMake","funding_links":["https://github.com/sponsors/jschwe"],"categories":["HarmonyOS","Recently Updated","CMake","Tools, Applications, Libraries, Frameworks"],"sub_categories":["Windows Manager","[Apr 09, 2025](/content/2025/04/09/README.md)"],"readme":"# Corrosion\n[![Build Status](https://github.com/corrosion-rs/corrosion/actions/workflows/test.yaml/badge.svg)](https://github.com/corrosion-rs/corrosion/actions?query=branch%3Amaster)\n[![Documentation](https://img.shields.io/badge/docs-latest-blue.svg)](https://corrosion-rs.github.io/corrosion/)\n![License](https://img.shields.io/badge/license-MIT-blue)\n\nCorrosion, formerly known as cmake-cargo, is a tool for integrating Rust into an existing CMake\nproject. Corrosion can automatically import executables, static libraries, and dynamic libraries\nfrom a workspace or package manifest (`Cargo.toml` file).\n\n## Features\n- Automatic Import of Executable, Static, and Shared Libraries from Rust Crate\n- Easy Installation of Rust Executables\n- Trivially Link Rust Executables to C/C++ Libraries in Tree\n- Multi-Config Generator Support\n- Simple Cross-Compilation\n\n## Sample Usage with FetchContent\n\nUsing the CMake `FetchContent` module allows you to easily integrate corrosion into your build.\nOther methods including installing corrosion or adding it as a subdirectory are covered in the\n[setup chapter](https://corrosion-rs.github.io/corrosion/setup_corrosion.html) of the \ncorrosion [documentation](https://corrosion-rs.github.io/corrosion/).\n\n```cmake\ninclude(FetchContent)\n\nFetchContent_Declare(\n    Corrosion\n    GIT_REPOSITORY https://github.com/corrosion-rs/corrosion.git\n    GIT_TAG v0.5 # Optionally specify a commit hash, version tag or branch here\n)\nFetchContent_MakeAvailable(Corrosion)\n\n# Import targets defined in a package or workspace manifest `Cargo.toml` file\ncorrosion_import_crate(MANIFEST_PATH rust-lib/Cargo.toml)\n\nadd_executable(your_cpp_bin main.cpp)\ntarget_link_libraries(your_cpp_bin PUBLIC rust-lib)\n```\n\n## Requirements\n\n### Stable v0.5 Release\n\n- CMake 3.15 or newer. Some features may only be available on more recent CMake versions\n- Rust 1.46 or newer. Some platforms / features may require more recent Rust versions\n\n### Development (master branch)\n\n- CMake 3.22 or newer\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcorrosion-rs%2Fcorrosion","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcorrosion-rs%2Fcorrosion","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcorrosion-rs%2Fcorrosion/lists"}