<AlexandervanSaas>
It's a little strange to implement a nor flash trait for an sd card because the semantics don't match but it seems to work fine.
<AlexandervanSaas>
I added an example using sequential-storage and I found using a cache is basically mandatory because otherwise the linear scans are killing performance.
<AlexandervanSaas>
That creates a bit of a challenge though because the sequential-storage cache RAM ram use scales with the number of pages/blocks and with an SD card and 512 byte blocks that quickly adds up. 8 megs when using the full u32 range 😅
<diondokter[m]>
<AlexandervanSaas> "That creates a bit of a challeng..." <- Ha lol. Yeah depending on which cache you're using, it has a couple of bytes per page of cache
<diondokter[m]>
Ok, so that's 8 million page you have
<JamesMunns[m]>
Neat! IIRC it's also similar to tokio's Notify
<JamesMunns[m]>
it looks like event_listener uses an alloc::Vec in no_std, and an intrusive list in std. maitake-sync::WaitQueue uses an intrusive list for both. This doesn't matter for postcard-rpc on std, but I use it because I like it and it works the same on std/no_std :)
<zeenix[m]>
ah right. event-listener is only nostd, not noalloc
badyjoke[m] has joined #rust-embedded
<badyjoke[m]>
Hello ! Does cargo valgrind works for embedded targets ?
M9names[m] has joined #rust-embedded
<M9names[m]>
valgrind instruments Linux's memory allocator to do it's work.
<M9names[m]>
if your embedded target is not running linux, the answer is no.
adamhott[m] has joined #rust-embedded
<adamhott[m]>
I feel like I bought a plane ticket but am standing at the window of the gate while the plane is taking off outside. I just learned how convenient static mut is....
Vicente[m] has joined #rust-embedded
<Vicente[m]>
Hi, I need help with smol `Arc<Mutex<Option<TcpStream>>>`. Why it is it hanging at `Acquire lock 3`?
<Vicente[m]>
I'm new to Rust, solved by manually drop()
xnor has joined #rust-embedded
<dirbaio[m]>
<Vicente[m]> "Isn't stream_wrapper dropped..." <- `let stream_wrapper = ...` creates a new variable with the same name that shadows the old one. the old still exists and still gets dropped at the end of the function.
<dirbaio[m]>
if you instead do stream_wrapper = ..., that does reassign the variable which does drop the guard.
<dirbaio[m]>
* if you instead do stream_wrapper = ... without let, that does reassign the variable which does drop the guard.
<Gnome[m]>
<adamhott[m]> "I feel like I bought a plane..." <- RE: static mut, it isn't a good idea to rely on it especially nowadays as it will be warned on usage in Rust 2024 and possibly removed in Rust 2027. It's better to use interior mutability, the closest to `static mut` would be `SyncUnsafeCell` but you should probably be using something like `static_cell` or `OnceLock`.
inara has quit [Quit: Leaving]
inara has joined #rust-embedded
crabbedhaloablut has quit []
crabbedhaloablut has joined #rust-embedded
lehmrob has joined #rust-embedded
lehmrob has quit [Quit: Konversation terminated!]
jxsl has quit [Ping timeout: 252 seconds]
<Vicente[m]>
<Gnome[m]> "RE: static mut, it isn't a..." <- Is this okay or could be removed too?
<Vicente[m]>
``````
<Vicente[m]>
> <@gnomeddev:matrix.org> RE: static mut, it isn't a good idea to rely on it especially nowadays as it will be warned on usage in Rust 2024 and possibly removed in Rust 2027. It's better to use interior mutability, the closest to `static mut` would be `SyncUnsafeCell` but you should probably be using something... (full message at <https://catircservices.org/_matrix/media/v3/download/catircservices.org/iJfPomYcvDNrhqqAxCsrkMHs>)