Git Product home page Git Product logo

Comments (4)

djkoloski avatar djkoloski commented on August 23, 2024 1

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:

  1. Comment out everything in 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.
  2. Install packages for or vendor the required compilers and configure your environment so they're picked up correctly by build.rs.

from rust_serialization_benchmark.

djkoloski avatar djkoloski commented on August 23, 2024 1

Assuming this is done since bincode 2 support has landed.

from rust_serialization_benchmark.

8192K avatar 8192K commented on August 23, 2024

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

from rust_serialization_benchmark.

djkoloski avatar djkoloski commented on August 23, 2024

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:

  • Comment out msgpacker from the list of default features in Cargo.toml.
  • When building or running from the command line, specify --no-default-features --features "..." with the explicit list of crates you want to enable benchmarking for.
  • Temporarily override to a nightly compiler by running 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.

from rust_serialization_benchmark.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.