- Fix missing variables provided by corrosion, when corrosion is used as a subdirectory (181): Public Variables set by Corrosion were not visible when using Corrosion as a subdirectory, due to the wrong scope of the variables. This was fixed by promoting the respective variables to Cache variables.
- Removed the integrator build script (#156). The build script provided by corrosion (for rust code that links in foreign code) is no longer necessary, so users can just remove the dependency.
- Direct usage of the following target properties has been deprecated. The names of the custom properties are
no longer considered part of the public API and may change in the future. Instead, please use the functions
provided by corrosion. Internally different property names are used depending on the CMake version.
CORROSION_FEATURES
,CORROSION_ALL_FEATURES
,CORROSION_NO_DEFAULT_FEATURES
. Instead please usecorrosion_set_features()
. See the updated Readme for details.CORROSION_ENVIRONMENT_VARIABLES
. Please usecorrosion_set_env_vars()
instead.CORROSION_USE_HOST_BUILD
. Please usecorrosion_set_hostbuild()
instead.
- The Minimum CMake version will likely be increased for the next major release. At the very least we want to drop support for CMake 3.12, but requiring CMake 3.16 or even 3.18 is also on the table. If you are using a CMake version that would be no longer supported by corrosion, please comment on issue #168, so that we can gauge the number of affected users.
- Add
NO_STD
option tocorrosion_import_crate
(#154). - Remove the requirement of building the Rust based generator crate for CMake >= 3.19. This makes using corrosion as a subdirectory as fast as the installed version (since everything is done in CMake). (#131, #161) If you do choose to install Corrosion, then by default the old Generator is still compiled and installed, so you can fall back to using it in case you use multiple cmake versions on the same machine for different projects.
- Fix Corrosion on MacOS 11 and 12 (#167 and #164).
- Improve robustness of parsing the LLVM version (exported in
Rust_LLVM_VERSION
). It now also works for Rust versions, where the LLVM version is reported asMAJOR.MINOR
. (#148) - Fix a bug which occurred when Corrosion was added multiple times via
add_subdirectory()
(#143). - Set
CC_<target_triple_undercore>
andCXX_<target_triple_undercore>
environment variables for the invocation ofcargo build
to the compilers selected by CMake (if any) (#138 and #161). This should ensure that C dependencies built in cargo buildscripts via cc-rs use the same compiler as CMake built dependencies. Users can override the compiler by specifying the higher priority environment variable variants with dashes instead of underscores (See cc-rs documentation for details). - Fix Ninja-Multiconfig Generator support for CMake versions >= 3.20. Previous CMake versions are missing a feature, which prevents us from supporting the Ninja-Multiconfig generator. (#137)
This is the first release of corrosion after it was moved to the new corrosion-rs organization. Since there are no previous releases, this is not a complete changelog but only lists changes since September 2021.
- Add --profile support for rust >= 1.57:
Allows users to specify a custom cargo profile with
corrosion_import_crate(... PROFILE <profilename>)
. - Add support for specifying per-target Rustflags:
Rustflags can be added via
corrosion_add_target_rustflags(<target_name> [rustflags1...])
- Add
Rust_IS_NIGHTLY
andRust_LLVM_VERSION
variables: This may be useful if you want to conditionally enabled features when using a nightly toolchain or a specific LLVM Version. - Let
FindRust
fail gracefully if rustc is not found: This allows usingFindRust
in a more general setting (without corrosion). - Add support for cargo feature selection: See the README for details on how to select features.
- Fix the cargo-clean target
- Fix #84: CorrosionConfig.cmake looks in wrong place for Corrosion::Generator when CMAKE_INSTALL_LIBEXEC is an absolute path
- Fix #116: (Option CORROSION_INSTALL_EXECUTABLE not working)
- Fix building on Windows with rust >= 1.57
- Corrosion is currently not working on macos-11 and newer. See issue #104. Contributions are welcome.