[corrosion] Add the Corrosion CMake Tool
- [X] Changes comply with the maintainer guide.
- [X] The name of the port matches an existing name for this component on https://repology.org/ if possible, and/or is strongly associated with that component on search engines.
- [X] Optional dependencies are resolved in exactly one way. For example, if the component is built with CMake, all
find_packagecalls are REQUIRED, are satisfied byvcpkg.json's declared dependencies, or disabled with CMAKE_DISABLE_FIND_PACKAGE_Xxx. - [X] The versioning scheme in
vcpkg.jsonmatches what upstream says. - [X] The license declaration in
vcpkg.jsonmatches what upstream says. - [X] The installed as the "copyright" file matches what upstream says.
- [X] The source code of the component installed comes from an authoritative source.
- [X] The generated "usage text" is accurate. See adding-usage for context.
- [x] The version database is fixed by rerunning
./vcpkg x-add-version --alland committing the result. - [x] Only one version is in the new port's versions file.
- [x] Only one version is added to each modified port's versions file.
It wasn't originally clear to me that you want each version in a separate MR (if I'm reading the MR template correctly). I can back out 0.4.1+ and submit the other 7 as separate MRs.
@microsoft-github-policy-service agree
Closing to relaunch as individual MRs with fixes applied for platforms other than linux
IMO it is really enough to add only 0.4.7 from the 0.4 series. By common conventions, these are patch releases.
Reopening as only submitting 1 version per @dg0yt suggestion
Mark info:reviewed for further review.
Note: It has a dependency on both the Rust compiler (cargo) and a C++ compiler.
Note: It has a dependency on both the Rust compiler (cargo) and a C++ compiler.
Corrosion maintainer here. Just to clarify, a C++ compiler is not required from Corrosions side. If you want to integrate Rust code into a C++ project, then of course a C++ compiler is required to compile and link the C++ code. But it's perfectly possible to use Corrosion with C + Rust projects, in which case a C-compiler is sufficient, or even just use Corrosion to only build rust code without building or linking any C or C++ code.
Vcpkg generally does not accept a port with only CMake helpers unless a specific C++ library requires it to build. Can you give an example? Also, I'm not exactly sure what benefit this port provides over the upstream recommended way of acquiring these helpers with FetchContent.
The test project I linked too was used a proof of concept to convenience my team of porting common utility code from C++ to open source rust projects. The projects we've updated are all behind proxies and cannot be shared on public GitHub.
The issue with FetchContent is that Vcpkg disables it by default. As my team develops code released on internal private Vcpkg registries, our port now need to go enable FetchContent again. That's a poor solution and requires us to maintain two different forms of dependency version control. Vcpkg shouldn't really make the statement that everything should come from Vcpkg, but also things should come from features that we disable by default. It wasn't clear or well documented that you even disable FetchContent. It took me 2-3 hours to figure out and resolve the issue.
Also, cmakerc is exactly that a cmake helper.
Hi @bconn98
The vcpkg team had a discussion regarding this PR and interactions between C++ and Rust projects. Here’s a summary of our thoughts:
We believe that the integration of Rust dependencies in C++ projects is becoming increasingly important and we want vcpkg to provide the best experience possible for C++ developers.
However, we are wary about two potential issues:
- Unresolved technical issues that may arise from this integration. For example, what happens when a cargo package requires vcpkg-installed dependencies?
- The implications for acquiring Rust dependencies within the vcpkg ecosystem that this PR could create.
Given that you are already using private registries, we believe that keeping this port as part of your team’s private registry is the best way forward. It also lets you make changes as needed without concern of breaking external users.
Please let us know if you have any further questions or concerns.
Unfortunate but I understand.
Closed by reasoning explained here: https://github.com/microsoft/vcpkg/pull/36369#issuecomment-1966055372
We may revise our stance in the future once the team has spent time designing a good Rust integration experience.
Vcpkg generally does not accept a port with only CMake helpers unless a specific C++ library requires it to build. Can you give an example?
eg. Slint, a declarative GUI developed by some former Qt developers.