ChanServ changed the topic of #rust-embedded to: Welcome to the Rust Embedded IRC channel! Bridged to #rust-embedded:matrix.org and logged at https://libera.irclog.whitequark.org/rust-embedded, code of conduct at https://www.rust-lang.org/conduct.html
dngrs[m] has quit [Quit: Idle timeout reached: 172800s]
starblue1 has quit [Ping timeout: 265 seconds]
starblue1 has joined #rust-embedded
nadja has quit [Ping timeout: 264 seconds]
nadja has joined #rust-embedded
cr1901_ has quit [Read error: Connection reset by peer]
cr1901 has joined #rust-embedded
chrysn[m] has quit [Quit: Idle timeout reached: 172800s]
emerent has quit [Ping timeout: 260 seconds]
emerent has joined #rust-embedded
AtleoS has joined #rust-embedded
AtleoS has quit [Ping timeout: 272 seconds]
AtleoS has joined #rust-embedded
AtleoS has quit [Read error: Connection reset by peer]
AtleoS has joined #rust-embedded
AtleoS has quit [Ping timeout: 276 seconds]
AtleoS has joined #rust-embedded
marmrt[m] has quit [Quit: Idle timeout reached: 172800s]
vollbrecht[m] has quit [Quit: Idle timeout reached: 172800s]
t-moe[m] has quit [Quit: Idle timeout reached: 172800s]
AtleoS has quit [Ping timeout: 252 seconds]
hmw has quit [*.net *.split]
hmw has joined #rust-embedded
AlexandrosLiarok has joined #rust-embedded
<AlexandrosLiarok> anyone has experience with using any no_std protobuf libraries?
<AlexandrosLiarok> it seems prost got some no_std support but I am not sure what that implies
cbjamo[m] has joined #rust-embedded
<cbjamo[m]> I've used prost in no_std. I needed to patch bytes for that to be no_std. Prost is ok, but I wish I hadn't use protobufs in the first place.
<AlexandrosLiarok> yea, I need to use it to export presets to the desktop and have them be compatible across firmware updates
<AlexandrosLiarok> I am open to alternatives
<cbjamo[m]> I don't know if this is applicable to your use case. For ours we have a gateway between the mcus and the rest of the system (and the rest of the system wants protobufs). If I was doing it again I'd use postcard between the mcu and gateway, then convert to the protobufs on the gateway.
<cbjamo[m]> This is the issue that requires the bytes patch: https://github.com/tokio-rs/bytes/issues/461 It may or may not apply to you, we're using the 2040, which is an M0.
<AlexandrosLiarok> not applicable unfortunately, I directly need to export to end users through midi.
<AlexandrosLiarok> and these presets may persist and be re-loaded across different versions :(
<cbjamo[m]> And here's my fork, which is really just a rebase (as of several months ago) of taiki-e's work: https://github.com/CBJamo/bytes/tree/cfg_target_has_atomic_update
<cbjamo[m]> Yeah, if you're locked into protobufs prost is a good library that's got a nice api.
<AlexandrosLiarok> there are some alternatives like femptopb
<AlexandrosLiarok> s/femptopb/femtopb/
<cbjamo[m]> What's your target mcu?
<AlexandrosLiarok> but it seems those don't provide streaming APIs which is annoying when full buffers are 6kb+
<AlexandrosLiarok> stm32h7
<cbjamo[m]> Ok, then you won't hit that issue, prost should just work out of the box.
<cbjamo[m]> I may have been unclear before, I like prost, I'd rather just never have to use protobufs.
<AlexandrosLiarok> yea I don't love it either.
<AlexandrosLiarok> Ideally I would use postcard but I need the forwards/backwards compatibility thing.
<cbjamo[m]> Take a look at postcard-rpc.
<JamesMunns[m]> (for context, postcard-rpc says "messages can never change, but you can add new kinds of messages"
<AlexandrosLiarok> to be clear, I need it just for the wire format
<JamesMunns[m]> * of messages")
<AlexandrosLiarok> I also save the wire format in memory :P
<JamesMunns[m]> this is sometimes useful, but not in all cases :)
<JamesMunns[m]> you could use the same trick postcard-rpc does:
<JamesMunns[m]> uniquely identify the "kind" of the message by hashing the schema
<JamesMunns[m]> but this means adding some bytes as a header to all messages.
<JamesMunns[m]> I did also see a new format, serde-brief, that I think is self describing and looks like it has good docs?
<JamesMunns[m]> I haven't tried it out yet
<AlexandrosLiarok> protobuf also has a small advantage in that it is a good format to describe your presets so that end users can build editors if they really want to.
<AlexandrosLiarok> since it is very cross-language
<JamesMunns[m]> yep, makes sense!
<JamesMunns[m]> Not here to talk you out of protobuf, it can be reasonable for all the complaints about it :)
<cbjamo[m]> Yeah, that's why our greater system demands the protbufs.
<cbjamo[m]> The other side is an ipad app, and they wanted protobufs.
<cbjamo[m]> JamesMunns[m]: This is interesting, thanks for pointing it out. A serde-first self describing format will be handy.
<AlexandrosLiarok> my main issue is detecting missing fields and adding non-fixed defaults which seems like it needs the per-field tagging protobuf approach.
<AlexandrosLiarok> and also ignoring unknown fields
<AlexandrosLiarok> (because presets can be shared across units of different versions)
<AlexandrosLiarok> serde brief seems cool, if used along with serde's default field tag
<AlexandrosLiarok> it would probably do the trick for me.
AtleoS has joined #rust-embedded
<AlexandrosLiarok> ideally I would also really like a kind of streaming serializer/deserializer
<AlexandrosLiarok> so that we don't need to keep a full maximum_size buffer at all times
<AlexandrosLiarok> it just needs to keep some state instead of doing it all in simple serialize/deserialize functions
<AlexandrosLiarok> .. which I guess is almost the same as using async write/reader traits.
AtleoS has quit [Ping timeout: 260 seconds]
dnm has quit [Ping timeout: 248 seconds]
dnm has joined #rust-embedded
edm has quit [Ping timeout: 248 seconds]
edm has joined #rust-embedded
jannic[m] has quit [Quit: Idle timeout reached: 172800s]
diondokter[m] has quit [Quit: Idle timeout reached: 172800s]
ana_briated[m] has quit [Quit: Idle timeout reached: 172800s]
starblue1 has quit [Quit: WeeChat 3.8]
dne has quit [Remote host closed the connection]
dne has joined #rust-embedded
drewbus[m] has quit [Quit: Idle timeout reached: 172800s]