-
I'm trying to compile a crate that Rust doesn't support - Classic Mac OS - and use it with a C/C++ codebase I already have. This is possible thanks to steps outlined in this guide. Because this is using a fork of gcc, I don't expect much more effort in this working beyond what is described in that guide; the important part is having my crate build within the cmake script. The roadblock I'm having is actually that I can't compile the crate due to it wanting a nightly feature. -- Build files have been written to: /home/gavin/Projects/PowerBoot/build-PowerPC
[ 0%] Built target cargo-prebuild_PowerNet
[ 3%] Built target everest
[ 5%] Built target p256m
warning: `/home/gavin/Projects/PowerBoot/PowerNet/.cargo/config` is deprecated in favor of `config.toml`
note: if you need to support cargo 1.38 or earlier, you can symlink `config` to `config.toml`
[ 22%] Built target libssh2_static
Compiling PowerNet v0.1.0 (/home/gavin/Projects/PowerBoot/PowerNet)
error[E0554]: `#![feature]` may not be used on the stable release channel
--> src/lib.rs:5:1
|
5 | #![feature(lang_items)] lang_items is needed in order to implement a All I can find on doing this is something internal to corrosion titled "Rust_IS_NIGHTLY"; I didn't expect setting it to work, and indeed it does not. set(Rust_IS_NIGHTLY 1 CACHE INTERNAL "" FORCE)
corrosion_import_crate(
MANIFEST_PATH PowerNet/Cargo.toml
NO_DEFAULT_FEATURES
NO_STD
NO_LINKER_OVERRIDE
NO_USES_TERMINAL
) What do I do? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
It ended up not being what I needed, this entire thing is not possible with Corrosion and I had to do things myself, but I'm interested in the answer. |
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
Rust_TOOLCHAIN
allows you to select a different rust toolchain, e.g. nightly.