Closed 8192K closed 3 months ago
Are you running into issues because of the contents of build.rs
? The primary job of build.rs
is to generate Rust code for capnproto, flatbuffers, and prost. Right now, on all non-windows platforms, build.rs
assumes that your environment is configured with the compilers for those serialization frameworks installed. On linux, you should install the capnproto, flatbuffers, and protobuf compilers through your package manager or provide custom versions via environment variables. My personal development environment is primarily windows, which has worse support for installing those compilers in a structured way. I added some additional logic to that file which uses locally-vendored versions of those compilers to get it working on Windows. I'm not familiar with installing packages on MacOS; the two paths forward are:
build.rs
while you're working. Because the Rust code for those schemas is checked in, you do not need to have those compilers installed unless you need to regenerate them.build.rs
.I am getting
error[E0554]:
#![feature]
may not be used on the stable release channel --> /Users/sebastian/.cargo/registry/src/index.crates.io-6f17d22bba15001f/msgpacker-0.4.3/src/lib.rs:3:5 | 3 | iter_array_chunks, | ^^^^^^^^^^^^^^^^^error[E0554]:
#![feature]
may not be used on the stable release channel --> /Users/sebastian/.cargo/registry/src/index.crates.io-6f17d22bba15001f/msgpacker-0.4.3/src/lib.rs:4:5 | 4 | maybe_uninit_array_assume_init, | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^error[E0554]:
#![feature]
may not be used on the stable release channel --> /Users/sebastian/.cargo/registry/src/index.crates.io-6f17d22bba15001f/msgpacker-0.4.3/src/lib.rs:5:5 | 5 | maybe_uninit_uninit_array | ^^^^^^^^^^^^^^^^^^^^^^^^^error: could not compile
msgpacker
(lib) due to 3 previous errors
That's because the msgpacker
crate is enabled by default and uses nightly features. Your default Rust compiler is stable. You can fix this in a few ways:
msgpacker
from the list of default features in Cargo.toml
.--no-default-features --features "..."
with the explicit list of crates you want to enable benchmarking for.rustup override add nightly
in your workspace.
If you're working in an editor, you may be better off with the first or third options. LSPs like rust-analyzer use all of the default settings for a workspace and will continue to show errors based on those default settings.Assuming this is done since bincode 2 support has landed.
I am trying to add bincode2 (RC3 currently) but I can't even run a cargo check on MacOS without any changes. It fails to find capnp. Can this repo currently be run on Windows only?