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
sroemer has joined #rust-embedded
sroemer has quit [Ping timeout: 276 seconds]
sroemer has joined #rust-embedded
nadja has quit [Ping timeout: 248 seconds]
nadja has joined #rust-embedded
cinemaSundays has joined #rust-embedded
bpye has quit [Quit: Ping timeout (120 seconds)]
bpye has joined #rust-embedded
cinemaSundays has quit [Quit: Connection closed for inactivity]
sroemer has quit [Ping timeout: 244 seconds]
anton_star has joined #rust-embedded
anton_star has quit [Ping timeout: 256 seconds]
anton_star has joined #rust-embedded
jr-oss has quit [Read error: Connection reset by peer]
jr-oss has joined #rust-embedded
anton_star has quit [Ping timeout: 256 seconds]
starblue has quit [Ping timeout: 260 seconds]
starblue has joined #rust-embedded
<Socke> is it somehow possible to do a match expression but with a &str as scrutinee and regex patterns as patterns? this would greatly simplify my code
<Socke> is there maybe a library that offers some kind of macro for this?
JamesMunns[m] has joined #rust-embedded
<JamesMunns[m]> I believe https://docs.rs/regex-automata/latest/regex_automata/ is no_std, and is what the main regex crate is built on top of, but I believe it has a much less convenient set of APIs.
marmrt[m] has joined #rust-embedded
<marmrt[m]> regex appears to have a std feature flag, so there should be some no_std support there
<JamesMunns[m]> marmrt[m]: it might still require alloc
<JamesMunns[m]> extern crate alloc is unconditional there
<Socke> JamesMunns[m]: oh i'm not under no-std, so std would also be fine
Lumpio[m] has joined #rust-embedded
<Lumpio[m]> Does that give you access to the match results though
<Lumpio[m]> As in, captures
<JamesMunns[m]> Lumpio[m]: Nope
<Lumpio[m]> You could probably write a macro_rules for it if you need to do it a lot I guess
<Lumpio[m]> Otherwise if let Some(c) = re1.captures(...) { ... } else if let ... would work I guess
<Lumpio[m]> s//`/, s/.../...`/
<Lumpio[m]> Could even potentially do it as a normal function if you don't mind a slightly odd syntax when calling it
alex[m]1 has joined #rust-embedded
<alex[m]1> I'm doing some research about doing CI on real hardware. I've seen some intriguing stuff in Embassy's teleprobe (like a test runner). I've scoured awesome-testing but I haven't found much- does anybody know any interesting public prior art on testing (e.g. running tests on a variety of boards, collecting results, etc.) or even something more reduced in scope (like mediating access to dev boards)?
koalillo has joined #rust-embedded
mameluc[m] has joined #rust-embedded
<mameluc[m]> <alex[m]1> "I'm doing some research about..." <- looking for something similar myself. Bookmarked https://robotframework.org/ a while ago but I have no clue if it fits the bill
<Lumpio[m]> Robot Framework is probably one of the worst programming languages I've used. One space is an identifier characters, two or more is a separator? Who came up with this...
i509vcb[m] has joined #rust-embedded
<i509vcb[m]> I'd certainly be interested in some sort of testing framework for the mspm0 hal
<i509vcb[m]> At this point at least I can reasonably acquire at least one of each model in some size
jessebraham[m] has joined #rust-embedded
<jessebraham[m]> <alex[m]1> "I'm doing some research about..." <- We are using `probe-rs` and `embedded-test` for `esp-hal`, been working reasonably well for us for a number of months now.
Makarov has joined #rust-embedded
<alex[m]1> jessebraham[m]: I'd somehow missed embedded-test, thanks!
Kaspar[m] has joined #rust-embedded
<Kaspar[m]> <alex[m]1> "I'm doing some research about..." <- I built something for RIOT (a C rtos), http://ci.riot-os.org. It uses a fleet of pi and a homegrown job distribution. We'll upgrade this soon for rust based firmwares, probably re-using teleprobe. I'm super interested in collaborating!
rainingmessages has quit [Quit: bye]
rainingmessages has joined #rust-embedded
Makarov has quit [Quit: Ping timeout (120 seconds)]
Makarov has joined #rust-embedded
Makarov has quit [Write error: Connection reset by peer]
rainingmessages has quit [Quit: bye]
rainingmessages has joined #rust-embedded
almindor[m] has joined #rust-embedded
<almindor[m]> what's the fastest nostd way of filling a (power of 2 sized) [u8] buffer from a small [u8; count <= 4] buffer by repetition? something like the .repeat call for Vec but just "filling up existing" instead
GrantM11235[m] has joined #rust-embedded
<GrantM11235[m]> as_chunks_unchecked_mut looks like it works pretty well, but it's not stable yet https://rust.godbolt.org/z/PbPPf8hWc
<JamesMunns[m]> uh maybe something like dest.iter_mut().zip(src.iter().repeat()).for_each(|(d, s)| *d = *s);?
<almindor[m]> I think this works: https://rust.godbolt.org/z/PePsav48h
<almindor[m]> at least, I don't think I can get closer than that on stable
<almindor[m]> note: for me I can do separate cases of data sizes to 4
<GrantM11235[m]> JamesMunns[m]: Lol, the optimizer really doesn't like that https://rust.godbolt.org/z/6G17asxKz
<JamesMunns[m]> yeah, it works better with a fixed size
<JamesMunns[m]> JamesMunns[m]: This one looks a bit longer, but the other one just lowers to a memcpy, which is confusing because I don't see any loops, but I also don't know rv32 asm very well
<M9names[m]> If you want really fast, are okay with unsafe and can control creation of the buffer, I'd align(4) the buffer then align_to<u16> or align_to<u32> and use slice::fill
<almindor[m]> right, this works for size 2 and 4, for 3 I'd still need to fill by byte
<M9names[m]> Oh right, yep!
<almindor[m]> it seems though the difference is not big enough for the effort, even checked basic fill by byte seems to b eok
demon1[m] has joined #rust-embedded
<demon1[m]> is it possible to use freertos-rust with cortex-m0? it doesn't build because std::sync is missing (m0 doesn't support atomics)
<thejpster[m]> M0+ supports atomic load and store but not CAS. So the core::sync module definitely exists. But why std::sync? That seems odd to me.