Skip Navigation
Patterns for Modeling Overlapping Variant Data in Rust
  • I only skimmed this. But my mind from the start immediately went to

    struct CommonData {
     // common fields
    }
    
    enum VariantData {
      Variant1 {
        // Variant1 specific fields
      },
      // same for other variants
    }
    
    struct Search {
      common: CommonData,
      variant: VariantData,
    }
    

    but I reached the end and didn't see it.

    Isn't this the way that comes to mind first for others too?

  • Showcase: Axium, an example API
  • Very quickly skimmed Cargo.toml and main.rs.

    • What's with the title-case name?
    • The name proximity to axum is also not cool.
    • You should mention that this is built on top of axum in the project description.
    • How did you end up using both lazy_static and once_cell, when OnceLock has been stable since 1.70 and axum's MSRV is 1.75?
    • Why did you copy-paste min-sized-rust flags?
    • You can actually print like this:
    println!("{proto}://{ip}:{port}");
    

    instead of

    println!("{0}://{1}:{2}", proto, ip, port);
    

    and the positional indices are redundant anyway.

    • Since you're depending on tracing, you should actually use tracing::error instead of eprintln!("❌ ...").

    Okay. I will stop here.

  • Migrating away from Rust [gamedev]
  • Reads okay for the most part. But I like how we see the same point about AI as a feature in some more serious real-life projects. There, we frame it as "Rust makes it harder for a 'contributor' to sneak in LLM-generated crap".

  • When I found out even Rust needed the clib, it was like seeing an iron-clad fortress only to look closer and see it was being held up by sticks, ducktape, and prayers.
  • /mj this post was an experiment to see If I should start posting from my personal jerk archive here. But exactly as I expected and anticipated given the visibility in public feeds, this community has decent traffic, but none of the culture, or any familiarity whatsoever with the meta-ironic jerking style of the OG community. The lack of a separate meta sub/community is also not helpful since it forces users to /mj inline. But that separate community would have been public too, possibly compounding the problem.

  • When I found out even Rust needed the clib, it was like seeing an iron-clad fortress only to look closer and see it was being held up by sticks, ducktape, and prayers.
    github.com Consider adding Linux targets that don't depend on libc · Issue #2610 · rust-lang/rfcs

    e.g. x86_64-linux (or x86_64-unknown-linux-rust). These would be the spiritual successor of steed: a standard library, free of C dependencies, for Linux systems. Steed implemented (or planned to) t...

    Consider adding Linux targets that don't depend on libc · Issue #2610 · rust-lang/rfcs

    > Every programming problem I have, when I track it down to it's source, seems to originate with C/C++. It wasn't till a few years ago that I realized how seriously everything I do somehow, some way, has C/C++ as a foundation. Basically every zero-day exploit in my cyber security class is because of something stupid in C/C++. And it goes well beyond security, the more I dive into C++ the more terrible stuff I find. When I found out even Rust needed the clib, it was like seeing an iron-clad fortress only to look closer and see it was being held up by sticks, ducktape, and prayers.

    7
    [Migration post] Can you please comment here if you see this post? That will allow us to have an idea of instances that are now federated with the community.
  • Its called fetching it.

    No. I was specifically thinking of webfinger. That's Lemmy's (ActivityPub) way of checking if an id (user or community) exists or not. Then, an instance may "read" the remote community using its outbox (if requested), and a snapshot of that remote community would now exist in the local instance. That "snapshot" doesn't get updated unless another attempt is made to view the now known remote community, AND a certain period have passed (It was 24 hours the last time I looked). In that second time, a user may actually need to make a second request (refresh/retry) to see the updates, and may need to do that after a few seconds (depending on how busy/fast instances are).

    If at least one user however subscribes to that remote community, then the remote instance live-federates all updates from that community to the subscribed user's local instance, and all these issues/complications go away.

  • [Migration post] Can you please comment here if you see this post? That will allow us to have an idea of instances that are now federated with the community.
  • You need subscribers from instances, not views. Without subscribers, an instance may have an outdated version of your community without updates. People may see your community because someone pinged* it recently, maybe via a search, and their instance grabbed your then outbox at that time.

    Ideal Federation is achieved when you have 2+ subscribers from every instance federating with your community instance. One subscriber would be enough too, but people choose to nuke there accounts sometimes, and Lemmy has the option to really erase an account as if it never existed 😉

    * or whatever Lemmy calls it, haven't looked in a while.

  • Cutting Down Rust Compile Times From 30 to 2 Minutes With One Thousand Crates
  • make uses multiple processes for parallelism, or what the blog post (below) calls "interprocess parallelism". cargo/rustc has that and intraprocess parallelism for code generation (the backend) already. the plan is to have parallelism all the way starting from the frontend. This blog post explains it all:

    https://blog.rust-lang.org/2023/11/09/parallel-rustc/

  • Rust GUI survey 2025
  • Along the same vein, too many open source projects don’t factor in non-“gnu/linux” environments from the start.

    No one is entitled to anything from open-source projects.

    I spent time making sure one of my public tools was cross platform once. This was pre-Rust (a C project), and before CI runners were commonly available.

    I did manage it with relative ease, but Mac/mac (what is it now?) without hardware or VMware wasn't fun (or even supported/allowed). Windows was a space hog and it's a shit non-POSIX OS created by shits anyway, and Cygwin/MSYS wouldn't have cut it for multiple reasons including performance. The three major BSDs, however, were very easy (I had prior experience with FreeBSD, but it would have been easy in any case).

    People seem to have forgotten that doing open-source was supposed to be fun first and for most. Or rather, the new generation seems to never have gotten that memo.

    POSIX is usually where a good balance between fun and public service is struck. Whether Mac/mac is included depends on the project, AND the developers involved. With CLI tools, supporting Mac/mac is often easy, especially nowadays with CI runners. With GUIs, it's more complicated/situational.

    Windows support should always be seen as charity, not an obligation, for all projects where it's not the primary target platform.

  • rustc_codegen_gcc: Progress Report #35
  • Yeah, apologies for not communicating the issue clearly.

    cp config.example.toml config.toml
    ./y.sh prepare
    ./y.sh build --sysroot
    ./y.sh clean all
    # above commands finish with success
    # below, building succeeds, but it later fails with "error: failed to load source for dependency `rustc-std-workspace-alloc`
    ./y.sh test --release 
    

    And then trying to use the "release" build fails:

    % CHANNEL="release"  ./y.sh cargo build  --manifest-path tests/hello-world/Cargo.toml
    [BUILD] build system
        Finished `release` profile [optimized] target(s) in 0.03s
    Using `/tmp/rust/rustc_codegen_gcc/build/libgccjit/d6f5a708104a98199ac0f01a3b6b279a0f7c66d3` as path for libgccjit
       Compiling mylib v0.1.0 (/tmp/rust/rustc_codegen_gcc/tests/hello-world/mylib)
    error[E0463]: can't find crate for `std`
      |
      = note: the `x86_64-unknown-linux-gnu` target may not be installed
      = help: consider downloading the target with `rustup target add x86_64-unknown-linux-gnu`
      = help: consider building the standard library from source with `cargo build -Zbuild-std`
    
    For more information about this error, try `rustc --explain E0463`.
    error: could not compile `mylib` (lib) due to 1 previous error
    

    I will make sure to report issues directly in the future, although from account(s) not connected to this username.

  • rustc_codegen_gcc: Progress Report #35
  • Oh, and clean all doesn't work reliably. Since trying to build in release mode after building in debug mode then cleaning is weirdly broken.

    And It's not clear from the README how to build in release mode without running test --release. And the fact that all combinations of --release-sysroot and --release --sysroot and --release --release-sysroot exist doesn't help 😉

  • rustc_codegen_gcc: Progress Report #35
  • @antoyo@programming.dev

    I gave this a try for the first time. Non-LTO build worked. But LTO build failed:

    x86_64-pc-linux-gnu-gcc-15.0.0: fatal error: ‘-fuse-linker-plugin’, but liblto_plugin.so not found
    

    I don't have the time to build gcc and test. But presumably, liblto_plugin.so should be included with libgccjit.so?

  • [OC] Rust tops a diverse list of implementation languages in projects getting NLnet grants, Python 2nd, C is alive, and C++ is half dead!

    https://nlnet.nl/news/2025/20250321-call-announcement-core.html

    Notes

    1. Projects meaningfully sharing two programming languages get 0.5 a point each, even if the split is not exactly half-half.
    2. Two projects are listed under "Multi/Misc/Other" which is opinionated, and some may disagree with.
    3. Three points (5 projects) are assigned to "Unaccounted/Not Available". Two of the projects have no code at all (related to the grant, or otherwise). One project with no published code is (charitably) listed under "Python", however, since the author mentions Python+QT as the choice for implementation.

    9.5 (10 projects) Rust

    https://git.joyofhardware.com/Products/FastWave2.0 https://github.com/slint-ui/slint https://github.com/stalwartlabs/mail-server https://github.com/dimforge https://github.com/DioxusLabs/blitz https://github.com/fdtshim https://github.com/trynova/nova https://github.com/yaws-rs https://github.com/lycheeverse/lychee https://git.syndicate-lang.org/synit/synit (0.5 rust, 0.5 shell)

    9 Python (8 + 1 project without code)

    https://github.com/owasp-dep-scan/blint https://github.com/web-platform-tests/wpt https://github.com/niccokunzmann/open-web-calendar https://git.xmpp-it.net/sch/Rivista https://github.com/DataLab-Platform/DataLab https://codeberg.org/IzzyOnDroid/rbtlog https://gitlab.com/py3dtiles/py3dtiles https://codeberg.org/flohmarkt/flohmarkt https://rackweaver.app/ (says python+qt, but no code yet)

    6 (7 projects) C

    https://mntre.com/sources.html https://github.com/open-sdr/openwifi https://wiki.musl-libc.org/ https://github.com/LekKit/RVVM https://github.com/skarnet/s6-rc https://git.savannah.gnu.org/git/mes (scheme interpreter, compiler + minimal libc in C = 0.5) https://www.gnunet.org/ (gnunet itself is C = 0.5, Anroid work would presumably use Java/Kotlin/Dart/... = 0.5 unaccounted)

    3.5 (4 projects) TypeScript

    https://github.com/cartesapp/cartes https://github.com/edumeet https://github.com/adorsys/open-banking-gateway (0.5 Java, 0.5 TypeScript) https://github.com/janeirodigital/sai-js (grant is about specification work. But implementation is in TypeScript)

    3.5 (4 projects) Java

    https://github.com/slovensko-digital/autogram https://github.com/igniterealtime/Openfire https://github.com/MarginaliaSearch/MarginaliaSearch https://github.com/adorsys/open-banking-gateway (0.5 Java, 0.5 TypeScript)

    3 Kotlin

    https://github.com/florisboard/florisboard https://github.com/EventFahrplan/EventFahrplan https://github.com/tuskyapp/Tusky

    2.5 (3 projects) Hardware/Verilog/...

    https://github.com/opera-platform/opera-dsp https://github.com/simple-crypto/SMAesH https://github.com/IObundle/iob-versat (hardware part = 0.5, software is C++)

    2.5 (3 projects) Scheme

    https://codeberg.org/spritely/goblins https://nlnet.nl/project/SchemeTestingFramework (no external link in grant page) https://git.savannah.gnu.org/git/mes (scheme interpreter, compiler + minimal libc in C = 0.5)

    2.5 (3 projects) JavaScript

    https://github.com/CycloneDX/cdxgen https://github.com/overte-org/overte (0.5 C++, 0.5 JS) https://nlnet.nl/project/TALER-integration-Nuxt (no external link)

    2 Nix

    https://nlnet.nl/project/Nix-ControlPlane https://github.com/ibizaman/selfhostblocks (no external link)

    2 Go

    https://github.com/namecoin/encaya (namecoint-core is written in C++, but the grant is about encaya) https://github.com/hockeypuck/hockeypuck

    1.5 (3 projects) C++

    https://github.com/IObundle/iob-versat (software part = 0.5, hardware is Verilog) https://github.com/overte-org/overte (0.5 C++, 0.5 JS) https://kde.org/plasma-desktop (grant is about mobile power management improvements, no idea about the code, but KDE/Plasma is C++, so charitable 0.5 for C++, 0.5 unaccounted)

    1 Clojure

    https://github.com/NyanCAD/Mosaic

    1 Assembly

    https://lib25519.cr.yp.to/ (grant covers NEON vector implementation)

    1 Haskell

    https://github.com/ghc-proposals/ghc-proposals

    1 Julia

    https://github.com/PeaceFounder/AppBundler.jl

    0.5 Shell

    https://git.syndicate-lang.org/synit/synit (0.5 rust, 0.5 shell)

    2* Multi/Misc/Other

    https://github.com/IObundle/iob-linux (build project, a mix of python, Make, and C from OpenSBI) https://unifiedpush.org/ (specification for Android and D-Bus. Implementations in Go, C, Kotlin, and Flutter)

    3* (5 projects) Unaccounted/Not Available

    https://www.gnunet.org/ (possible non-native Android yet to be written) https://kde.org/plasma-desktop (grant is about mobile power management improvements, no idea about the code but, KDE/Plasma is C++, so 0.5 for C++, 0.5 unaccounted) https://nlnet.nl/project/LicenseCompatibilityAutomation (no external link or specific info about the implementation) https://librediagnostic.com/ (fully unaccounted, site pages "under construction") https://github.com/mapterhorn (fully unaccounted, from org readme "Coming soon...")

    0
    [OC] Rust tops a diverse list of implementation languages in projects getting NLnet grants, Python 2nd, C is alive, and C++ is half dead!

    https://nlnet.nl/news/2025/20250321-call-announcement-core.html

    Notes

    1. Projects meaningfully sharing two programming languages get 0.5 a point each, even if the split is not exactly half-half.
    2. Two projects are listed under "Multi/Misc/Other" which is opinionated, and some may disagree with.
    3. Three points (5 projects) are assigned to "Unaccounted/Not Available". Two of the projects have no code at all (related to the grant, or otherwise). One project with no published code is (charitably) listed under "Python", however, since the author mentions Python+QT as the choice for implementation.

    9.5 (10 projects) Rust

    https://git.joyofhardware.com/Products/FastWave2.0 https://github.com/slint-ui/slint https://github.com/stalwartlabs/mail-server https://github.com/dimforge https://github.com/DioxusLabs/blitz https://github.com/fdtshim https://github.com/trynova/nova https://github.com/yaws-rs https://github.com/lycheeverse/lychee https://git.syndicate-lang.org/synit/synit (0.5 rust, 0.5 shell)

    9 Python (8 + 1 project without code)

    https://github.com/owasp-dep-scan/blint https://github.com/web-platform-tests/wpt https://github.com/niccokunzmann/open-web-calendar https://git.xmpp-it.net/sch/Rivista https://github.com/DataLab-Platform/DataLab https://codeberg.org/IzzyOnDroid/rbtlog https://gitlab.com/py3dtiles/py3dtiles https://codeberg.org/flohmarkt/flohmarkt https://rackweaver.app/ (says python+qt, but no code yet)

    6 (7 projects) C

    https://mntre.com/sources.html https://github.com/open-sdr/openwifi https://wiki.musl-libc.org/ https://github.com/LekKit/RVVM https://github.com/skarnet/s6-rc https://git.savannah.gnu.org/git/mes (scheme interpreter, compiler + minimal libc in C = 0.5) https://www.gnunet.org/ (gnunet itself is C = 0.5, Anroid work would presumably use Java/Kotlin/Dart/... = 0.5 unaccounted)

    3.5 (4 projects) TypeScript

    https://github.com/cartesapp/cartes https://github.com/edumeet https://github.com/adorsys/open-banking-gateway (0.5 Java, 0.5 TypeScript) https://github.com/janeirodigital/sai-js (grant is about specification work. But implementation is in TypeScript)

    3.5 (4 projects) Java

    https://github.com/slovensko-digital/autogram https://github.com/igniterealtime/Openfire https://github.com/MarginaliaSearch/MarginaliaSearch https://github.com/adorsys/open-banking-gateway (0.5 Java, 0.5 TypeScript)

    3 Kotlin

    https://github.com/florisboard/florisboard https://github.com/EventFahrplan/EventFahrplan https://github.com/tuskyapp/Tusky

    2.5 (3 projects) Hardware/Verilog/...

    https://github.com/opera-platform/opera-dsp https://github.com/simple-crypto/SMAesH https://github.com/IObundle/iob-versat (hardware part = 0.5, software is C++)

    2.5 (3 projects) Scheme

    https://codeberg.org/spritely/goblins https://nlnet.nl/project/SchemeTestingFramework (no external link in grant page) https://git.savannah.gnu.org/git/mes (scheme interpreter, compiler + minimal libc in C = 0.5)

    2.5 (3 projects) JavaScript

    https://github.com/CycloneDX/cdxgen https://github.com/overte-org/overte (0.5 C++, 0.5 JS) https://nlnet.nl/project/TALER-integration-Nuxt (no external link)

    2 Nix

    https://nlnet.nl/project/Nix-ControlPlane https://github.com/ibizaman/selfhostblocks (no external link)

    2 Go

    https://github.com/namecoin/encaya (namecoint-core is written in C++, but the grant is about encaya) https://github.com/hockeypuck/hockeypuck

    1.5 (3 projects) C++

    https://github.com/IObundle/iob-versat (software part = 0.5, hardware is Verilog) https://github.com/overte-org/overte (0.5 C++, 0.5 JS) https://kde.org/plasma-desktop (grant is about mobile power management improvements, no idea about the code, but KDE/Plasma is C++, so charitable 0.5 for C++, 0.5 unaccounted)

    1 Clojure

    https://github.com/NyanCAD/Mosaic

    1 Assembly

    https://lib25519.cr.yp.to/ (grant covers NEON vector implementation)

    1 Haskell

    https://github.com/ghc-proposals/ghc-proposals

    1 Julia

    https://github.com/PeaceFounder/AppBundler.jl

    0.5 Shell

    https://git.syndicate-lang.org/synit/synit (0.5 rust, 0.5 shell)

    2* Multi/Misc/Other

    https://github.com/IObundle/iob-linux (build project, a mix of python, Make, and C from OpenSBI) https://unifiedpush.org/ (specification for Android and D-Bus. Implementations in Go, C, Kotlin, and Flutter)

    3* (5 projects) Unaccounted/Not Available

    https://www.gnunet.org/ (possible non-native Android yet to be written) https://kde.org/plasma-desktop (grant is about mobile power management improvements, no idea about the code but, KDE/Plasma is C++, so 0.5 for C++, 0.5 unaccounted) https://nlnet.nl/project/LicenseCompatibilityAutomation (no external link or specific info about the implementation) https://librediagnostic.com/ (fully unaccounted, site pages "under construction") https://github.com/mapterhorn (fully unaccounted, from org readme "Coming soon...")

    0
    Koto: a simple and expressive programming language, usable as an extension language for Rust applications, or as a standalone scripting language

    cross-posted from: https://programming.dev/post/23822190

    > I added this language to my watch list some time ago and forgot about it, until I got a notification about a new release (0.15) yesterday. > > I'm someone who is familiar with system languages (C, Rust) and shell languages (Bash, Zsh, ..). But don't have much experience, at a proficient level, with any languages setting in between. > > So I gave Koto's language guide a read, and found it to be very well-written, and the premise of the language in general to be interesting. I only got annoyed near the end when I got to @base, because I'm an anti-OOP diehard 😉 > > I hope this one well start to enjoy some adoption.

    7
    Koto: a simple and expressive programming language, usable as an extension language for Rust applications, or as a standalone scripting language

    I added this language to my watch list some time ago and forgot about it, until I got a notification about a new release (0.15) yesterday.

    I'm someone who is familiar with system languages (C, Rust) and shell languages (Bash, Zsh, ..). But don't have much experience, at a proficient level, with any languages setting in between.

    So I gave Koto's language guide a read, and found it to be very well-written, and the premise of the language in general to be interesting. I only got annoyed near the end when I got to @base, because I'm an anti-OOP diehard 😉

    I hope this one well start to enjoy some adoption.

    11
    cushy v0.3.0 Released
    github.com Release v0.3.0 · khonsulabs/cushy

    Breaking Changes This crate's MSRV is now 1.74.1, required by updating wgpu. wgpu has been updated to 0.20. winit has been updated to 0.30. All context types no longer accept a 'window life...

    Release v0.3.0 · khonsulabs/cushy
    1
    slint 1.6.0 Released
    github.com Release 1.6.0 · slint-ui/slint

    Release announcement with the highlights: https://slint.dev/blog/slint-1.6-released Detailed list of changes: ChangeLog

    Release 1.6.0 · slint-ui/slint
    2
    InitialsDiceBearhttps://github.com/dicebear/dicebearhttps://creativecommons.org/publicdomain/zero/1.0/„Initials” (https://github.com/dicebear/dicebear) by „DiceBear”, licensed under „CC0 1.0” (https://creativecommons.org/publicdomain/zero/1.0/)BB
    BB_C @programming.dev
    Posts 9
    Comments 320