<thejpster[m]>
error: creating a mutable reference to mutable static is discouraged
<thejpster[m]>
that's not discouraged, that's banned
<JamesMunns[m]>
You have -D warnings enabled
<JamesMunns[m]>
= note: `-D static-mut-refs` implied by `-D warnings`
<JamesMunns[m]>
= help: to override `-D warnings` add `#[allow(static_mut_refs)]`
<thejpster[m]>
ahh
<JamesMunns[m]>
Warning? Believe it or not? Straight to jail.
<thejpster[m]>
that explains why they are only yellow further up
mchodzikiewicz[m has quit [Quit: Idle timeout reached: 172800s]
JamesSizeland[m] has joined #rust-embedded
<JamesSizeland[m]>
What is the most ergonomic way of serializing a struct of primitives to a heapless vec in no_std? I feel like we're missing something...
<diondokter[m]>
When you create the vec it's gonna be empty
<diondokter[m]>
So you get an empty slice from it
<JamesMunns[m]>
dunno if you've tried postcard, but postcard definitely supports a direct to-vec method, but Dion is right here!
<JamesSizeland[m]>
postcard is great, but I didn't think we could use it to talk to services that don't have the postcard deserialize on the other end
<diondokter[m]>
You can't. But you didn't really specify what your constraints are :)
<JamesSizeland[m]>
Yeah fair π
<JamesMunns[m]>
Yeah, +1 that postcard is meant for when you have Rust on both sides :)
<JamesMunns[m]>
At least until I finally get around to writing a compiler/code generator for other languages :)
<JamesMunns[m]>
(it's 100% possible, the hard problem is "how do you define your schema outside of Rust", but I'm building a lot of tools for that now, for other reasons, so the bar is getting lower :) )
<thejpster[m]>
(I get 10% OSS time. Right now I'm using up that time to do some releases. If this pleases you or your employer, you can always buy a ferrocene license)
<thejpster[m]>
I published defmt 0.3.10 which pins defmt-macros to 0.4.0 (which had a breaking bump from 0.3.whatever)
cinemaSundays has quit [Quit: Connection closed for inactivity]
JaminMartin[m] has quit [Quit: Idle timeout reached: 172800s]
<diondokter[m]>
Hey, so this afternoon I released a second release candidate for device-driver. However, for some reason if rc.0 is specified in the cargo.toml, it'll just freely update to rc.1. Why?
<diondokter[m]>
I thought all prerelease versions were counted as separate and would not update to the highest one?
<diondokter[m]>
So 1.0.0-rc.0 auto updates to 1.0.0-rc.1 and I didn't think it would do that...
<thejpster[m]>
That was my understanding too. Because after the dash is just arbitrary.
<thejpster[m]>
> Cargo allows βnewerβ pre-releases to be used automatically. For example, if 1.0.0-beta is published, then a requirement foo = "1.0.0-alpha" will allow updating to the beta version. Note that this only works on the same release version, foo = "1.0.0-alpha" will not allow updating to foo = "1.0.1-alpha" or foo = "1.0.1-beta".
<thejpster[m]>
Oh
<thejpster[m]>
So it ignores the text but understands publishing order
<diondokter[m]>
But then how was that done with embedded-hal? That one didn't update...
<diondokter[m]>
Exactly the same... I don't get it
<thejpster[m]>
Did they use =?
<diondokter[m]>
No, but afaik you don't have to...
<thejpster[m]>
If you pin with = you only get that exact version
<diondokter[m]>
rc.1 should not be regarded as compatible with rc.0
<diondokter[m]>
At least it didn't for embedded-hal when I was using the alpha and rc when I used it for its 1.0 release
<diondokter[m]>
Maybe I just misremember?
<thejpster[m]>
Maybe. Or maybe cargo changed. Or maybe your version was pinned.
<diondokter[m]>
Oh! Maybe maybe it worked out because I was using a HAL that did pin it?
igiona[m] has quit [Quit: Idle timeout reached: 172800s]
cinemaSundays has joined #rust-embedded
<projectgus[m]>
<JamesMunns[m]> "I think that's just no-panic..." <- Thanks James. I guess I wanted something more granular as there might be other places that can panic. But applying no-panic at the function level might be the right amount of granularity (and also easier to reason about than individual statements).
norineko has quit [Remote host closed the connection]