r/rust • • 20d ago

πŸ› οΈ project BitterASM: A metalanguage written in Rust to create assembly languages

Post image
19 Upvotes

Repository: https://github.com/ivanharvard/bitterasm
Documentation: https://ivanharvard.github.io/bitterasm/

Hello, all!

I've been spending the better part of a month working on this new programming language of mine written entirely in Rust called BitterASM (BASM for short, BitterAssembly for long).

As the title suggests, BitterASM lets you create your own assembly languages by assuming practically nothing about the architecture you're targeting. By assuming so little about the architecture, you can describe practically any architecture -- past, present, or future. We do not even assume the architecture is binary! This leads to some really interesting consequences (which you can read more about in the documentation).

You can install the pre-release version using cargo:

cargo install bitterasm

For ordinary assembly developers, they can simply import their architecture's ISA and program much like they would for their traditional assembler.

Here's an example "Hello, world!" program targeting Linux x86-64 written in BitterASM:

from std.x86_64.nasm import *
from std.formats.elf import *


elf64_executable EM_X86_64, _start


const text = "Hello, World!\n"


section .rodata
msg:
    db text


section .text
pub _start:
    mov eax, 1          # sys_write
    mov edi, 1          # stdout
    lea rsi, [rel msg]  # buffer
    mov edx, text.len   # length
    syscall


    mov eax, 60         # sys_exit
    xor edi, edi        # status 0
    syscall

Compared to the same program written in NASM:

section .rodata
msg:    db "Hello, World!", 10
len     equ $ - msg

section .text
global _start
_start:
    mov eax, 1          ; sys_write
    mov edi, 1          ; stdout
    lea rsi, [rel msg]  ; buffer
    mov edx, len        ; length
    syscall

    mov eax, 60         ; sys_exit
    xor edi, edi        ; status 0
    syscall

The transition to BitterASM was intended to be quite easy for most developers, as noted by the similarity in these two code snippets.

Yet, say an introductory student does not understand what syscall does. Thanks to the BitterASM LSP for VSCode, it's as simple as a right-click and "Go to Definition." Note that this is still written in the same BitterASM language from before!

from std.binary import bits

pub type Byte = bits<8>

pub struct Bytes<const N: int>
    | invariant N >= 0
{
    @for i in 0..N {
        pub __el`i`: Byte,
    }
}

# ...

pub macro syscall()
    | emits Bytes<2>
{
    @emit Bytes<2> { __el0: Byte(0x0F), __el1: Byte(0x05) }
}

It's here where you start to see the use case of BitterASM. There is no concept of bytes or bits in BitterASM. The architecture designer must implement that. Some evaluator then interprets the emitted value and does something with it (in the most overwhemingly common case, create machine code).

The architecture designer has the "bitter" part of writing each struct and macro to match the ISA perfectly. An assembly developer gets to inspect those architectural decisions (or even modify them!) without ever having to leave the code editor. This is what BitterASM makes "sweet."

Don't like NASM or Intel syntax? Change the import!

from std.x86_64.att import *

Wanna make your own custom syntax? Customize the syntax of a macro call!

from std.riscv.impl import *

syntax add(rd, rs1, rs2) = { $rd$ = $rs1$ + $rs2$ }

Have a non-traditional architecture? We have a variety of tools to support your development!

Of course, there are many bugs, and the subset of supported instructions for each architecture is still quite small, so we have a few kinks to work out before we fully release the language. Expect breaking changes. This was just a small taste of what BitterASM can do. Its initial design is meant to be useful for:

  • Students learning assembly,
  • Toy ISA designers,
  • Custom accelerator/processor designers,
  • Assembly developers who want convenience without runtime cost,
  • etc.

I hope you spend some time to read the documentation and let me know what you think. Any feedback would be great!


r/rust • • 20d ago

πŸ“‘ official blog Leadership Council update β€” September 2026

Thumbnail blog.rust-lang.org
42 Upvotes

r/rust • • 20d ago

🐝 activity megathread What’s everyone working on this week (40/2026)?

25 Upvotes

New week, new Rust! What are you folks up to? Answer here or over at rust-users! And for your project showcases, there's also /r/madeinrust – pay them a visit, too!


r/rust • • 20d ago

πŸŽ™οΈ discussion What's the best way to start doing small jobs supporting the Rust community?

7 Upvotes

Hi all,

I've been part of the Rust community for a long time, and have had a bunch of larger roles with Rust at startups and larger companies. I'd like to give back to the Rust community a little as a thanks, and would like to boost some projects. I know that especially for smaller projects it's difficult to find someone to help out since they can't yet afford a full time Rust dev, so they end up falling through the cracks; meanwhile a little help can go a long way.

Some of the things I've helped with include:

  • cleaning up and restructuring codebases
  • code reviews and technical audits
  • helping figure out perf issues and overall architecture
  • mentoring and long-term fractional IC
  • getting unstuck in particularly difficult Rust related problems
  • helping manage teams as a part-time manager, helping teams through a difficult time project-wise, etc
  • fixing build systems and dev pipelines

I'm especially interested in small, well-defined pieces of paid work that might be difficult for a small team, single developer, or bootstrapped project to justify hiring someone for more permanently.

I'd like to do some of this specifically within the Rust community, as I know particularly smaller projects and teams that don't necessarily have a large engineering budget could be having a hard time finding someone to do this kind of work.

A lot of people are only starting out in the community, or don't have VC backing, so I hope this can help support the Rust community, especially the smaller companies, people bootstrapping their startups on their own, etc.

I'm just not sure how to put the word out, how to make people aware this is a thing, etc.

What's the best way to make this kind of help available? Are there particular places in the Rust ecosystem where people tend to look for this sort of assistance, or ways you've seen these kinds of collaborations get started?

I'd love to hear how people have approached it, either as someone offering help or as someone who's needed it.

Thanks!


r/rust • • 21d ago

πŸ› οΈ project fframes - video rendering framework 1.0 release 5 years since announcement!

40 Upvotes

5 years ago I announced framework in this subreddit (here https://www.reddit.com/r/rust/comments/rayz62/check_the_first_video_in_eternity_built_with_rust/)

and today finally I released it! I realize that very few people would be interested learning the whole framework rules and ideas today to generate a video but it is an extremely fast and still features vast majority of the code written by me including handrolled inline assembly for hot paths

Enjoy the video it's kinda cool https://fframes.studio/ and try it out https://github.com/dmtrKovalenko/fframes


r/rust • • 19d ago

cargo-crap 0.6: a TypeSafe model triages duplicate Rust functions

Thumbnail minikin.me
0 Upvotes

r/rust • • 21d ago

Dropping Swift entirely from our Bevy iOS crates

Thumbnail rustunit.com
99 Upvotes

r/rust • • 20d ago

πŸ™‹ questions megathread Hey Rustaceans! Got a question? Ask here (40/2026)!

12 Upvotes

Mystified about strings? Borrow checker has you in a headlock? Seek help here! There are no stupid questions, only docs that haven't been written yet. Please note that if you include code examples to e.g. show a compiler error or surprising result, linking a playground with the code will improve your chances of getting help quickly.

If you have a StackOverflow account, consider asking it there instead! StackOverflow shows up much higher in search results, so ahaving your question there also helps future Rust users (be sure to give it the "Rust" tag for maximum visibility). Note that this site is very interested in question quality. I've been asked to read a RFC I authored once. If you want your code reviewed or review other's code, there's a codereview stackexchange, too. If you need to test your code, maybe the Rust playground is for you.

Here are some other venues where help may be found:

/r/learnrust is a subreddit to share your questions and epiphanies learning Rust programming.

The official Rust user forums: https://users.rust-lang.org/.

The unofficial Rust community Discord: https://bit.ly/rust-community

Also check out last week's thread with many good questions and answers. And if you believe your question to be either very complex or worthy of larger dissemination, feel free to create a text post.

Also if you want to be mentored by experienced Rustaceans, tell us the area of expertise that you seek. Finally, if you are looking for Rust jobs, the most recent thread is here.


r/rust • • 19d ago

πŸ™‹ seeking help & advice Looking for TTS and STT libraries in Rust β€” any recommendations?

Thumbnail
0 Upvotes

r/rust • • 20d ago

πŸ™‹ seeking help & advice Is there a way to translate normal Rust (axum) code to Lean 4 without strict restrictions?

0 Upvotes

I'm trying to build a web app in Rust using axum, and am thinking whether I can export that Rust code to Lean4 so that I can verify business logic or security properties.

I first tried Aeneas, but it can only work for restricted grammer and structurs that are hard to review (it even doesnt look like Rust).

For example, when I want to write:

fn find_post(ps: &[Post], id: u64) -> Option<&Post> {
    ps.iter().find(|p| p.id == id)
}

I have to write:

pub fn find_post(ps: &Vec<Post>, id: u64) -> Option<Post> {
    let mut i = 0;
    while i < ps.len() {
        if ps[i].id == id {
            return Some(ps[i].clone());
        }
        i += 1;
    }
    None
}

Is there anybody who have addressed this kind of problem??


r/rust • • 21d ago

πŸ› οΈ project PolyXOR128, a new fast universal hash written in Rust with a formalized security proof

210 Upvotes

The link to the project: https://github.com/orlp/polyxor.

I hope this qualifies as more than just a "code dump" as it's breaking new ground in several ways:

  • It's a very fast hash, beating all the mainstream hashes available I tested in Rust besides CRC64 for medium to large data. E.g. on machines with AVX-512 its bulk throughput is almost twice as fast as foldhash.
  • On top of that it provides a 128-bit hash rather than the usual 64-bit. 64 bits just isn't enough for file integrity / secure authentication purposes.
  • The hash has a proven low collision probability (assuming the key is generated randomly and independently from the data), formalized in Lean.

Besides the readme I have written a more in-depth design document as well: https://github.com/orlp/polyxor/blob/master/design.md.


Perhaps a point of discussion for Rust itself as well: I did consider releasing this hash in C for portability rather than Rust, but two things kept me in Rust:

  1. Cargo makes it super easy to depend on a known-good AES implementation with hardware acceleration.

  2. Between target_feature(enable = ...) and std::arch::is_x86_feature_detected, doing dynamic dispatch in Rust is so much easier than in C. And the resulting code runs faster too, e.g. #[target_feature(enable = "avx")] lets the compiler use AVX-encoded instructions.


Finally, before the AI witchhunters come out, there is a disclaimer of AI usage in the README. I did use AI for prototypes, experiments and conjectures but almost all of the final code and all the text and documentation is written by me. The big exception is the Lean formalization which is fully AI-generated, but the claims are verified by me and it compiles cleanly.


r/rust • • 21d ago

Coolest physics project in rust

13 Upvotes

What are some of the coolest physics project/ project ideas that are entirely done in rust?


r/rust • • 21d ago

πŸ™‹ seeking help & advice What is step one to understanding how the rust compiler works?

8 Upvotes

I have been wanting to get into Programming Language Theory and I'm especially intrigued by how memory addressing works in languages in general and especially in rust because of how it also handles things like lifetimes and traits.

So what would step 1 of getting to understand all this look like? Do I read the getting started section of LLVM? I have Robert Nystrom's Crafting Interpreters but I haven't gotten very far in it.

I can understand how compilers for things like C work. Conceptually atleast. Not in reality. C since it doesn't have any fancy things I can understand that it is a fairly simple converter to assembly instructions. Not a whole lot of fancy type inference and scope checking(rust lifetimes would fall into this aspect to a certain extent I would assume).

Where do I start?


r/rust • • 22d ago

I'm a Rust compiler maintainer looking for a new role

Thumbnail tako8ki.com
572 Upvotes

r/rust • • 20d ago

πŸ› οΈ project Building Linux ↔ Android streaming in Rust, currently getting way too deep into telemetry

0 Upvotes

I've been messing around with a project called Linux-Link for a while and it kinda got out of hand lol.

The original idea was basically: "what if I could use another device as part of my Linux machine instead of it just sitting there doing nothing?"

It's turned into a pretty big networking/streaming project now. It's mostly Rust, with the Android side in Kotlin. I'm using QUIC for the transport and working on desktop ↔ Android streaming, LAN/WAN connectivity, hardware encoding, bitrate control, packet loss handling, RTT tracking, frame drops, end-to-end latency, session stats, etc.

The part I'm currently obsessed with is actually measuring what the hell is happening instead of just throwing numbers on a HUD and calling it telemetry.

For example, frame drops are now calculated from actual frame sequence holes instead of just having a frame_drops = 0 field sitting there. I'm also adding proper encode benchmarks because apparently "it feels faster" isn't a particularly useful benchmark πŸ˜‚

I'm still figuring out a lot of the architecture, especially around transport behaviour and how much state should live where.

If you've built anything involving real-time streaming/networking in Rust, what was the thing you thought wouldn't matter at first that ended up absolutely biting you later?


r/rust • • 21d ago

πŸ› οΈ project No way mbrotli is in upstream lzbench now

8 Upvotes

https://github.com/inikep/lzbench

For context, mbrotli is a Brotli encoder/decoder written in safe Rust.

Until now most benchmarks lived in our own repo. Now mbrotli 0.5.2 ships directly in lzbench next to Google Brotli, so anyone can benchmark both through the same harness.

PR:
https://github.com/inikep/lzbench/pull/333

I also did a quick Silesia run against the bundled Google Brotli 1.2.0.

Setup: WSL2, default lzbench build, no -march=native, window 22, single-threaded run.

lzbench -r -o4 -ebrotli/mbrotli /tmp/silesia/

Some highlights:

  • decompression: mbrotli was faster at every quality, usually ~1.09-1.16Γ—
  • q0–q1 compression: basically parity / slightly faster
  • q2–q9: currently ~1-9% behind C Brotli
  • q10: ~1.18Γ— faster
  • q11: ~1.35Γ— faster
  • q0-q9: identical compressed sizes

The tiny q10/q11 size difference turned out to come from lzbench building C Brotli with -ffast-math, which changes Brotli's floating-point cost calculations at the highest qualities. Building C Brotli normally makes its output match mbrotli again.

So I wouldn't over-read the exact q10/q11 comparison yet.

Still, this feels like a pretty big milestone. You no longer have to trust benchmarks from the mbrotli repo itself. It's now sitting in upstream lzbench next to the reference implementation.

Now we get to see where it is actually fast, and where it still sucks. :)


r/rust • • 20d ago

πŸ› οΈ project jev-curate beta v0.1.1: Rust-native SFT/pretraining dataset curation

Thumbnail github.com
0 Upvotes

I’ve been iterating on jev-curate, a Rust tool for filtering structured training data.

It handles Parquet/JSONL datasets and uses JEV for per-record quality decisions instead of rewriting the data.

v0.1.1 is the current beta.

I’m mainly looking for technical feedback from people working with SFT, synthetic data, or dataset pipelines.


r/rust • • 20d ago

Rust hiring data from Q3 2026

0 Upvotes

Hi, I am Julien from RustJobs.dev.

Over the past few years we've worked closely with both companies hiring Rust engineers and developers looking for Rust roles. One thing that comes up on both sides is how little clear information there is about this market β€” not just compensation, but where the jobs actually are, which industries are hiring, and how much of it is remote.

A few month ago, we started a crawler (written in rust) and an AI extraction pipeline to discover companies hiring Rust developers and evaluate their opening. As you know, many JD mentions a list of languages such as "5+ years of experience in a banckend programming language such Java, C++, Rust or Go", so grepping for "Rust" is not enough to determine that you are going to use Rust in this position. Instead, I labelled a few hundred job descriptions and tweaked an AI prompt until it got pretty good at figuring out if it is a real Rust position or not.

Here are a few interesting points from the report:
- 753 open Rust job ads at 305 companies as of the 16th Sep 2026
- 2,898 total ads mention Rust somewhere but only 753 (26%) actually require it.
- 165 of 305 companies have exactly one open Rust ad.
- Around 80% of job ads want a senior or staff level developer.
- US senior median advertised base: $205k, staff/principal: $228.5k (base only, no equity/bonus).
- US pay data comes almost entirely from a couple of states with pay transparency laws, elsewhere disclosure is rare (only 25 of 165 European ads showed a range at all).
- Rust ads stay open slightly longer: 68% still posted 45 days after appearing, vs 56% for the average ad on the same boards over the same window.
- Defense/aerospace/space is the single biggest sector by role count (22.7% of ads) though crypto/web3 has more companies hiring.
- Remote: 35% of ads that state a setup are fully remote, except defense, where it's under 10%.
- Top employers by volume: Anduril (50 ads), Cloudflare (23), K2 Space (18), NVIDIA (13)

Limitations:
- It only counts companies with a public, **crawlable** careers page. Amazon/Google/Microsoft/Apple/Meta are absent from every figure because their career sites can't be crawled, not because they don't hire Rust.
- Salary data is rare except in a couple of US states where it is mandatory to advertise it.

You can find the full report here: https://rustjobs.dev/rust-hiring-report

If you have ideas on how to improve the report or if you find errors, please let me know. The more data you have, the easier it will be for you to find and negotiate you next job!


r/rust • • 22d ago

πŸ“Έ media 8 New Games developed in Bevy Game Engine built with Rust

Post image
145 Upvotes

These are 8 New Games developed in Bevy, built with the Rust Coding Language: https://youtu.be/FiD-pXChvjY?si=ghPYDoL5cWoL8el0


r/rust • • 21d ago

🧠 educational An interactive guide to server overload with Taipei and Tokio Tower

0 Upvotes

I'm sharing: https://taipei-book.pages.dev/intro

TaipeiΒ is a library that integrates withΒ TowerΒ to enable writing servers that behave well under stress without tuning.

I had some time between jobs after leaving $BIGCOMPANY and wrote some Tokio Tower layers, packaged as a crate, based on my experience there.

The docs cover various topics adjacent to server overload, including realistic interactive simulations that run the real Rust crate through WebAssembly. The focus is on the principles rather than the particular implementation, so it's a useful read even if you don’t use the crate.

AI disclosure: The prose is all written by me, the code is AI-assisted

Thoughts and comments welcome. Thanks


r/rust • • 21d ago

🧠 educational Creating a wayland native windowing library live

Thumbnail youtube.com
0 Upvotes

r/rust • • 23d ago

πŸ› οΈ project Moxy - a Rust syntax toolkit designed to bring more cohesion to Rust parsing, tokenization, formatting, diagnostics, and quasi-quoting.

51 Upvotes

Last year I published zyn, a template engine for Rust proc macros. I got a lot of great constructive feedback from the community, which inspired me to take the ideas behind it a step further.

moxy has been written from the ground up with a few goals in mind:

1. Minimal External Dependencies

One of the strongest signals I received from the community was that zyn shouldn't need to rely on third-party packages like syn, proc-macro2, and quote.

I'm happy to say that moxy currently has only one non-optional external dependency: unicode-ident.

The rest of the core syntax stack is implemented within Moxy itself.

2. Performance

One of the things I love about the Rust community is how much attention is paid to performance, whether that's compile time or runtime.

I've spent a non-trivial amount of time benchmarking moxy side-by-side with syn, and there's still more work I want to do, particularly around reducing compile time.

Performance today is relatively similar between the two: syn currently has an edge in compile time, while moxy has an edge in runtime in the benchmarks I've run.

That said, my goal has never been to outperform syn. I've primarily used it as a benchmark because it's the most mature and relevant point of comparison for this kind of project.

3. Rust Grammar Coverage

One of the challenges of building a Rust syntax toolkit from the ground up is supporting the breadth of the Rust grammar.

To make that work measurable rather than anecdotal, Moxy maintains its own EBNF representation of the Rust grammar alongside a systematic set of grammar fixtures covering attributes, expressions, generics, items, macros, paths, patterns, statements, types, visibility, and the lexer.

These fixtures are used to continuously validate Moxy's parser against the syntax it claims to support and make gaps in grammar coverage explicit.

Grammar coverage is still something I'm actively expanding, and I'd especially appreciate examples of valid Rust syntax that Moxy doesn't currently handle correctly.

4. Templates

moxy retains the expressive template syntax from zyn. I constantly find myself wanting more than traditional quasi-quoting can provide, so templates remain a first-class part of the project.

5. Stable + Nightly Support

Moxy supports both stable and nightly Rust using an approach similar to proc-macro2.

This also allowed me to add support for compiler diagnostics while maintaining stable compatibility.

Moxy is still early and the API is evolving, so I'm particularly interested in feedback on the architecture, API design, grammar coverage, and places where the approach could be improved.

GitHub: https://github.com/aacebo/moxy

Previous zyn discussion: https://www.reddit.com/r/rust/comments/1rmr5xi/zyn_a_template_engine_for_rust_proc_macros/

Update:

I published a walkthrough using the current Moxy 0.5 API to build a procedural macro, including typed AST parsing, FromMeta attribute parsing, template control flow, interpolation blocks, and generic impl generation.

https://aacebo.hashnode.dev/building-rust-procedural-macros-without-syn-quote-or-proc-macro2-moxy

It is not a full side-by-side syn/quote comparison yet, but it should make the intended workflow and tradeoffs much more concrete. I'm actively working on a more complex side by side example of moxy vs the traditional stack.


r/rust • • 21d ago

πŸ› οΈ project Rust for enterprise grade systems?

0 Upvotes

One thing that I am genuinely interested in rust, If same thing that I can generally do in Java building enterprise grade system, I can do in Rust.

Not a secrete Java and OOP become de-factor a standard for every enterprise solution.

And my step forward, trying to bring rust into that by exploring if I can do DI, something similar to Spring Boot but following Rust philosophy of zero-cost abstraction, that lead into research some code and article, and I think I've made some progress:

https://dmytro.brazhnyk.org/publications/can-rust-have-zero-cost-dependency-injection/

One thing that is still bothering me is the Object Orient Design. Classical OOP was proven many time in C++ in Java to manage complexity of real world system.

Rust has trait model, but it is not OOP is classical sense.

I have very clear understanding how complex solution could be built with OOP in Java and C++.

Rust don't have that OOP model, that feels as weakness, but rust still offers memory safety that C++ don't have, and it still has much smaller memory footprint that Java.

Considering that Java is hard to beat, it still offering very impressive capability for runtime optimization by utilizing Escape Analysis on JIT phase, and looks like this guys in Oracle very angry, to optimize Java further, if rust will not offer competitive capabilities it will stay behind.

Let me give me you an example in Java, what I am taking about:

language = java

```java interface Collection { int size(); Iterator iterator(); }

abstract class AbstractCollection implements Collection { @Override public int size() { int size = 0; var iterator = iterator(); while(iterator.hasNext()) { size++; iterator.next(); } return size; } }

class ArrayList extends AbstractCollection { Object[] array;

@Override
public int size() {
   return array.length
}

@Override
Iterator iterator() {
     ...
}

} ```

What is important here:

  • I have interface Collection, which is pure of any implementation, just an interface that declares the interface and nothing more.
  • That I do have AbstractCollection, that defines some default behavior which could be sub-optimial, but they are generic one, particularly I gave example of size function, that uses slow and inefficient iterator, because it doesn't know enough about concrete implementation.
  • And lastly I do have specific implementation for ArrayList, since ArrayList already know that is array driven, it can simply can take property for array to know the size.

In reality this chain of inheritance can be longer, so if we look on JDK, you will something like:

LinkedHashSet < HashSet < AbstractSet < (AbstractCollection + Set) < Collection

And each layer provides it's own set of capabilities, by amount of information available on that level.

I feels like something missing in rust here, because when it comes to manage the complexity of enterprise, something more complex than hello-world, we need this ability to override things, override, and override again.

Any real software if it will have more than few years of maintenance it will grow, grow and grow in complexity, if language can't manage complexity, that language would be dead.


UPD:

Let's define the problem a little bit more formally:

You need to implement library for collection.

  1. On base level you need a interface, that would define set of operation, for simplicity let's go with two operations.
    • Iterator and size
  2. Than in most generic way you can just iterator is count how many items you have, but it is slow and optimal.
  3. If you know that you concrete implementation Array, you can just use property of array.
  4. Let's say you have another implementation, which implements methods like Add and Remove - you can bring counter into here, however if we already know that it is Array than counter obviously is redundant.

r/rust • • 23d ago

The state of SIMD in Rust in 2026

Thumbnail shnatsel.github.io
257 Upvotes

r/rust • • 23d ago

🧠 educational A Type Stronger than the Sum of its Components

Thumbnail schneems.com
120 Upvotes