marcelbuesing / bme680

Pure Rust BME680 implementation
MIT License
28 stars 26 forks source link

add no_std compatibility test #13

Closed caemor closed 5 years ago

caemor commented 5 years ago

This should check that the crate stays no_std compatible in the future

caemor commented 5 years ago

Here is a possible replacement of the current problem line: https://play.rust-lang.org/?version=stable&mode=debug&edition=2018&gist=95d845986bc177992d90239870c58da1

marcelbuesing commented 5 years ago

Looks great! Would you mind creating a second commit containing your suggested fix ? Then I'll merge both.

marcelbuesing commented 5 years ago

Just checked and it seems there is more relying on std. Either that or my setup is just messed up. I always run into build errors using cargo check --target thumbv7m-none-eabi. Even when I remove the signum part. Do you experience the same ?

caemor commented 5 years ago

i didn't have the time to remove that line yet. tomorrow morning i should have more time to test and to prepare a 2nd commit with a fix

caemor commented 5 years ago

So it's working now, but it seems a bit complicated to make a "seperate" project in the ci folder just to test if the project is still no_std compatible.

@jamesmunns: is there a better way to check for no_std compatibility with ci when there are examples which need some std stuff (and therefore have std-dependencies)?

jamesmunns commented 5 years ago

I'll check this out soon!

marcelbuesing commented 5 years ago

Sorry that it took so long @caemor , anyway I finally merged the changes. Squashed the last two commits. Thank you for those changes! If there are better ideas how to check this @jamesmunns let's reopen this.