sntpc - Rust
Rust SNTP client
docs.rs/sntpc/latest... - example sent message and response:
SendRequestResult { originate_timestamp: 9487534988237733888, version: 35 }
NtpResult { seconds: 1754523286, seconds_fraction: 2473636652, roundtrip: 955, offset: 1754523208575415, stratum: 3, precision: -26 }
08.08.2025 14:31 β π 0 π 0 π¬ 0 π 0
My stm32 rust project has sntpc integration github.com/lucasw/misc_... - sntp_send_request() + sntp_process_response(), results are reported over udp in postcard packets. The systick clock drifts by about 0.3%, it was 50 seconds fast after letting it run for nearly five hours- good enough.
08.08.2025 14:29 β π 0 π 0 π¬ 1 π 0
to run without openocd + gdb 'run' need to disable semihosting Β· lucasw/misc_rust@7d81e0b
```
// need to disable semihosting to run outside of openocd + gdb
// use cortex_m_semihosting::hprintln;
// dummy hprintln
#[macro_export]
macro_rules! hprintln {
( $( $x:expr ),* ) => {
}
}
```
github.com/lucasw/misc_...
02.08.2025 15:06 β π 0 π 0 π¬ 0 π 0
Something isn't configured right, or I'm missing some steps- it runs only through openocd + gdb `run`, I can't power cycle it and receive packets from it otherwise.
02.08.2025 14:48 β π 0 π 0 π¬ 1 π 0
Starting to trade udp postcard encoded messages with an stm32 nucleo 144 dev board (stm32h753 in particular) github.com/lucasw/misc_... There are some issues with broadcasting, maybe I need a newer smoltcp? I could try updating it in github.com/lucasw/nucle...
02.08.2025 14:37 β π 2 π 0 π¬ 1 π 0
Had a gig wrap up a little earlier than expected, I should have availability starting July or so.
As always: if you need help with Embedded, Rust, or similar things, shoot me a message!
If you're a user of postcard, p-rpc, or are interested in the more experimental new ergot: shoot me a message!
17.06.2025 19:29 β π 36 π 21 π¬ 2 π 1
misc_rust/net_loopback at main Β· lucasw/misc_rust
rust projects. Contribute to lucasw/misc_rust development by creating an account on GitHub.
Serialize and deserialize multiple struct types and transmit with udp in rust with postcard- the example isn't no_std but I'm going to try something similar no-std next: github.com/lucasw/misc_... - there's more boilerplate around the use of the enum than I'd prefer though
31.07.2025 15:10 β π 0 π 0 π¬ 0 π 0
I've tried out postcard for a single struct type and it works well but for multiple I need my own match on a type tag and then decode the payload after the type with postcard? Does there happen to be an example of that? I can figure it out but I feel likely to re-implement what is already done.
29.07.2025 21:45 β π 0 π 0 π¬ 1 π 0
I'm looking for a no_std bytes go in, decoded messages of any of several struct types come out, and also do the reverse operation but I'll take care of the transport- can I use ergot for that, or postcard by itself is for that?
29.07.2025 19:34 β π 0 π 0 π¬ 1 π 0
nalgebra with no_std got me the error "the trait `RealField` is not implemented for `f32`
... required for `f32` to implement `SimdRealField`" when trying to make a Rotation2 with an angle. Solution: use libm:
nalgebra = { version = "0.33.2", default-features = false, features = ["libm"] }
12.07.2025 18:34 β π 0 π 0 π¬ 1 π 0
Bezier-rs Interactive Documentation
I was using the graphite bezier library which is more fully featured and has nice interactive documentation graphite.rs/libraries/be... - but really it should be a a standalone repository outside of graphite, and it isn't no_std (not sure how hard to fix that, found 'stroke' above anyhow)
05.07.2025 14:21 β π 0 π 0 π¬ 0 π 0
rust stroke cubic bezier curve
no_std bezier curves in rust github.com/dorianprill/... and I have a branch here that visualizes tangent and curvature (1.0 / radius) github.com/lucasw/strok...,
example curve using plotters below. Next thing to do is make some adjustments to the closest point finding.
05.07.2025 14:18 β π 0 π 0 π¬ 1 π 0
in clothoid rs:
pub fn angle_unwrap(angle_radians: Float) -> Float {
(angle_radians + PI) % (2.0 * PI) - PI
}
...
04.07.2025 14:07 β π 0 π 0 π¬ 0 π 0
pub mod f32 {
pub type Float = f32;
use core::f32::consts::{FRAC_2_SQRT_PI, FRAC_PI_2, PI};
include!("clothoid.rs");
}
pub mod f64 {
pub type Float = f64;
use std::f64::consts::{FRAC_2_SQRT_PI, FRAC_PI_2, PI};
include!("clothoid.rs");
}
04.07.2025 14:05 β π 0 π 0 π¬ 1 π 0
compile an f32 and f64 version of clothoid curve, with the f32 aiming⦠· lucasw/clothoid_curve_rs@8d8df6d
β¦ to be no_std
Compile the same code twice, once with f32 and the other with f64, and then access it like my_package::f32::foo and my_package::f64::foo (maybe glam or others do something similar? I was going to look if I couldn't get it working but it worked)
github.com/lucasw/cloth...
04.07.2025 14:04 β π 0 π 0 π¬ 1 π 0
If None is passed in by itself it results in "cannot infer type of the type parameter `F` declared on the method `foo`", even though a type really isn't needed because nothing makes use of the type, it's None.
01.07.2025 21:37 β π 0 π 0 π¬ 0 π 0
Optional function as parameter to another function
pub fn foo<F: Fn(f64) -> f64>(
...
my_fn: Option<&F>
)
call it with None like this:
foo(..., None::<fn(f64) -> f64>.as_ref())
01.07.2025 21:34 β π 0 π 0 π¬ 1 π 0
"2007: Scott Hassan and Steve Cousins found Willow Garage... it would create the PR2 research robot and the wildly successful ROS operating system. ROS is used to this day by enthusiastic researchers and frustrated companies who canβt figure out how to migrate off of it."
30.06.2025 17:59 β π 0 π 0 π¬ 0 π 0
π€ #rustconf Session Announcement: Yang Zhou
βRust for Robotics: Safer, Faster Systems for Autonomous Applicationsβ
β rustconf.com/schedule/#1480
#rustlang
18.06.2025 20:13 β π 2 π 1 π¬ 1 π 0
But there isn't a SeriesLine3D, instead I'm having to use LineStrips3D but send mostly the same points over and over every update... which isn't terrible but seems inefficient. I could log_static it up in segments instead, but wouldn't that clutter up the viewer with the many many instances?
17.06.2025 16:41 β π 0 π 0 π¬ 0 π 0
clothoid curve generated within egui, specify length and curvature and curvature rate and visualize
github.com/lucasw/cloth... is a rust adaptation of a subset of github.com/ebertolazzi/..., for generating clothoid curves
16.06.2025 19:00 β π 0 π 0 π¬ 0 π 0
a rerun.io SeriesLines
rec.log("chart/line1", &rerun::Scalars::single(y1 as f64))?;
16.06.2025 18:01 β π 0 π 0 π¬ 0 π 0
SeriesLines
<!-- DO NOT EDIT! This file was auto-generated by crates/build/re_types_builder/src/codegen/docs/website.rs -->
In rerun a stripchart is called a SeriesLines, where 1d points are appended to a plot at the current set time (like the default behavior of every plot in plotjuggler) rerun.io/docs/referen...
16.06.2025 17:38 β π 0 π 0 π¬ 2 π 0
There's also a tool `mcap_image_to_compressed` github.com/lucasw/mcap_... that converts Image messages to CompressedImage in a new output mcap (though leaves out all other messages, I'll add a passthrough option later to make it more like rosbag_image_compressor)
02.06.2025 15:03 β π 0 π 0 π¬ 0 π 0
Quickly view all CompressedImage topics in an mcap using mcap_view - github.com/lucasw/mcap_... - I'll make it support regular Image next (which is more work, it's less code to decode jpg bytes that interpret raw bytes in any of several formats). The example is using a tartandrive2 figure8 excerpt.
01.06.2025 18:05 β π 0 π 0 π¬ 1 π 0
Get a tartandrive2 file down to a reasonable size (from 18GB): `mcap filter figure_8_0.bag.mcap -o figure_8_0_excerpt.mcap --start-secs 1699993440` - but it is slow, it is iterating through 300K messages (underlying cli code is written in go, could it be faster in rust or loading 18GB is just slow?)
01.06.2025 16:59 β π 0 π 0 π¬ 0 π 0
hi, I'm amos! π they/them π« open-source witch & maker of snappy videos and articles at @bearcove.eu β¨ be kind, be curious
articles: https://fasterthanli.me
videos: https://youtube.com/@fasterthanlime
podcast: https://sdr-podcast.com
Random initial conditions: M between 0.1 & 150 solar masses | Speed less than 10 km/s | Positions in a 50x50 AU box | code and more info at https://github.com/kirklong/ThreeBodyBot
Co-founder and CTO of Oxide Computer Company. According to Field of Schemes, "tech exec and Oakland A's fan" -- but more of an Oakland Ballers fan now.
π©βπ» staff eng
π¦ post a lot about rust and rust gamedev
βοΈ wrote https://sokoban.iolivia.me
π₯ blog at https://iolivia.me
π§΅ weekly #rustlang threads every Thursday - subscribe here https://forms.gle/Tcm7cAkLt4NF9ZCZ9
Rust π¦, Bevy, Game Dev and Beyond
rustlang, depth psychology, gamedev, music
https://github.com/nxsaken
A #rustlang programmer
GitHub: https://github.com/garkimasera
i work on rust mostly
https://errs.io
Organizer of rustweek.org.
Non-profit with the goal to promote the Rust programming language.
A cool company. π§
π Unlock the full potential of your code with real-time profiling.
Creators of Parca!
polarsignals.com
Bi-Weekly Digest for Rustaceans https://weeklyrust.substack.com/
A conference for #rustlang developers building networked applications with Tokio. π¦ Join us April 20β22, 2026, for the inaugural TokioConf β practical knowledge, real-world insights, and more!
Infrastructure Engineer at @rustfoundation.org
ποΈ Podcast host https://ieni.dev/rustship
π¦ Maintainer @release-plz.dev
π Mastodon @MarcoIeni@hachyderm.io
π Website https://ieni.dev
Infra, Rust, and motorcycles π³οΈβπ
Building @atuin.sh
Software developer into Swift, Rust and Emacs
martinrechsteiner.com
Rustlang and Rustlang accessories
* YouTube: https://www.youtube.com/@chrisbiscardi
* Learn Rust: https://www.rustadventure.dev/
* Rust Discord: https://discord.gg/GJ5UfxzUcP
* Party Corgi Content Discord: https://discord.gg/partycorgi
Embedded tech lead at Tweede golf. I love programming in Rust.
Also at: @diondokter@fosstodon.org
Netherlands
Rust at Zoo (prev Cloudflare). Texan (prev Australian). Pynchon fan (prev illiterate).
Building a new programming language for CAD at zoo.dev. Love reading sci-fi, pre-20th century history. Blogging at adamchalmers.com and living in Austin TX.
EuroRust is a 2 day conference for the European Rust community. We cover all things Rust. Presented by @mainmatter.com
October 9th+10th 2025, Paris & online