Closed mobergmann closed 1 month ago
I just noticed, that the error is not occurring with the stable rust version:
[nix-shell:~/Source/vl53l0x]$ cargo --version
cargo 1.77.1
[nix-shell:~/Source/vl53l0x]$ rustc --version
rustc 1.77.2 (25ef9e3d8 2024-04-09) (built from a source tarball)
but only with the nightly version. Sadly, afaict, is the nightly version mandatory for my project.
@mobergmann thanks for reporting, we will look into supporting nightly (and will be happy to review proposed changes)
I am currently looking into it and it seems, that the issue is in the cast crate.
I created an issue on the cast repository: https://github.com/japaric/cast.rs/issues/46
ah, we should just get rid of cast
imo -- does not bring a lot of value.
We did this in few other crates, eg https://github.com/copterust/mpu9250/commit/55f7e6e6d25441b6f007cad64c1fa0ea8a96fef3
I could try doing this, but I am fairly new to "real world" rust. Therefore my code might be a bit ... clumsy. I will focus strongly on the code you referenced.
@little-arhat I created an MR #14 with the cast crate removed. I hope the code is okay. It compiles with the latest rust version and nightly.
I tried to use this library for using my vl53loc-v2 senor. But when I try to compile the project I get an compilation error for this library:
My project is basically straight out of the cargo generate tool for the Arduino Uno. I customized it a bit, but basically it looks like this:
I am using nixos with a rustup shell as according to the nixos wiki: