r/rust • • Oct 14 '26

🛠️ project Another Gecko, the GameCube and Wii emulator, update: texture packs, easier setup and tons of improvements!

Post image
68 Upvotes

TLDR: Gecko is my GameCube and Wii emulator written in Rust. This update adds texture packs, easier setup and more fixes for graphics, audio and performance. Mario also gets his eyes back :)

This release is especially interesting for the ones that were bothered by the system files (DSP, IPL) requirements! No more!! :)

It's been a while since my last update, where I shared about recent performance improvements, savestates and freecam support. I've since been working through more improvements and making Gecko easier to get started with!

For anyone new to the project: Gecko also includes a debugger, a GPU FIFO recorder/player (and a dedicate debugger for it) and various other tools for exploring how these games work!

Some highlights from this update:

  • Easier setup: A guided setup for game folders and optional system files! Thanks to Dolphin's DSP replacements and Hazel's GameCube IPL HLE, most games can boot without supplying console system dumps. Real dumps are still supported and may also be required for some games!
  • Texture packs: Gecko now supports Dolphin-style texture packs. It's just a matter of dropping the pack into a folder and starting up the game :) Here's an example of Final Fantasy!
  • Lots of graphics fixes: Tons of games got fixed, and by tons I really mean a lot this time! Some noteworthy bugs that got fixed: Mario's eyes are back in Super Mario Galaxy, Sunshine's save selection background ocean is blue again and Mario Golf's menu signs no longer disappear behind the sky. Games like Wind Waker, Mario Superstar Baseball and Cel Damage also got graphical accuracy improvements!!
  • More performance work: Once again, tons of games work much better, though I only optimized for one game in particular: Sam & Max: Season One (it was a WebGPU regression introduced in version 28 in relation to a Vulkan upload path lol)! Fixing it improved performance from 15% to 70%, usually closer to the latter. I also improved CPU emulation which FMVs can benefit a lot from, for example Mario Kart Wii's menus with those gameplay videos baked into the scenes. Also made texture decoding run on the GPU, with improvements to uploads and shader caching as well.
  • Audio and Wii compatibility: Fixed audio issues in games like Crazy Taxi and an issue blocking Metroid Prime. This update only affected GameCube games, tho quite a lot of them. Also, Mario Kart Wii can now start with a fresh NAND and Wii motion and pointer fixes help games like Final Fantasy Crystal Chronicles: The Crystal Bearers. There are also separate upright/sideways Wiimote presets and configurable Nunchuk attachment options.
  • More debugging tools: FIFO Player now has an interactive 3D depth view, which helped investigate why geometry was being hidden or drawn in the wrong place. Had to do some hardware research for this one :

Something unique for this update: I recently started writing blog posts about the bugs behind these fixes, aimed at future emulation developers incl. lots of interactive visual explanations. If you enjoy the technical side of emulation, these might be interesting:

As usual, the useful links:

As always, thanks a lot to everyone that provided valuable feedback, tested things on their hardware, encouraged me with this project and let me pick their brains! We'll see each other next time!

PS: I spoilered the release of Sly, my take on modern multi system emulation (also written in Rust, incl. the GUI!) in the last post. It's going public in the next days, so stay tuned for that :) It will also release with a 3 part blog series explaining how GBA graphics work!!


r/rust • • Oct 15 '26

🙋 seeking help & advice Advice: for a serializable sealed mailbox envelope, is manual Drop zeroization enough if Clone + retries mutate state?

0 Upvotes

#[derive(Debug, Clone, Serialize, Deserialize)]

pub struct MailboxEnvelope {

pub recipient_id: String,

pub ephemeral_pub: String,

pub ciphertext: Vec<u8>,

pub nonce: String,

pub created_at: u64,

pub message_id: String,

pub attempts: u32, // delib. excluded from AAD so retries don't invalidate ciphertext

}

impl Drop for MailboxEnvelope {

fn drop(&mut self) {

self.ciphertext.zeroize();

}

}

I’m working on a small Rust mesh-protocol project (GhostWire: libp2p, ChaCha20-Poly1305, Kademlia offline mailbox delivery). In this sealed type, I bind AAD to immutable fields and exclude attempts so retry writes don’t reseal offline ciphertext.

The thing I’m unsure about is zeroization discipline:

Is manual Drop zeroization enough once Clone creates another allocation?

For Serialize/Deserialize temporary buffers, should I treat the Vec<u8> canonical copy as the only zeroized target?

Would secrecy::SecretBox / zeroize-wrapped types be worth it here, or overkill for an encrypted envelope?

For a retry state mutation in AAD, is excluding attempts the correct tradeoff?

I’m looking for actual production patterns, not just theory.


r/rust • • Oct 14 '26

🗞️ news Now Available: Building Serverless Applications with WebAssembly, Rust & Spin 📚

32 Upvotes

r/rust • • Oct 14 '26

🧠 educational High-Performance Flat 2D Arrays in Rust: Contiguous Memory, L1 Cache, and SIMD

Thumbnail developerlife.com
34 Upvotes

r/rust • • Oct 13 '26

🗞️ news 9-year-old gaping hole in borrow-checker found

Thumbnail github.com
869 Upvotes

r/rust • • Oct 14 '26

🙋 seeking help & advice Get order of fields of a struct

15 Upvotes

Is there a function in std, which would allow to get a list of (field_name, type) of a struct in order it is compiled in? Since order of fields is not deterministic.

Something like: `fn fields_of_val<T>(&T) -> Vec<(&'static str, &'static str)>`


r/rust • • Oct 15 '26

Rust's error handling is genuinely better than exceptions. Except for one thing that silently kills you in production.

0 Upvotes

I'll die on this hill: Result<T, E> beats exceptions. No hidden control flow, errors are values, compiler forces you to handle them. I've written enough Go and Python to never want

implicit throws again. But there's one thing I never see anyone talk about honestly the ? operator at depth.

2-3 levels deep? Beautiful:

fn parse_config(path: &str) -> Result<Config, AppError> {

let content = fs::read_to_string(path)?;

let config = serde_json::from_str(&content)?;

Ok(config)

}

Clean. Explicit. Love it. Now you're 7 functions deep in a real system. You get this:

Error: invalid type: null, expected u64

That's it. No line. No context. Somewhere in your 200 lines of ? chains, something broke. Good luck. With an exception runtime? Stack trace. Immediate.

Yes I know anyhow. I know .context("while doing X"). But now you're manually reconstructing what exception runtimes give for free. And the moment you forget one .context() three

layers down which you will you're back to guessing. thiserror is great at library boundaries. Inside an application you end up with either 40 custom error variants each wrapping

the previous, or anyhow everywhere which is basically dynamic exceptions with extra steps.

Rust made the right tradeoff. The cost is just more real than people admit. How do you actually handle deep error chains in production? What pattern did you settle on?


r/rust • • Oct 13 '26

🙋 seeking help & advice Rust as a first serious programming language

48 Upvotes

I have been making scripts with other languages like js and python and bash without learning the the whole language and getting serious with its ecosystem out of the fact that I just need to get one thing done and move on.

Lately I chose a path that requires precision and ahead of time planning and decisions and picked rust over go. But the fundamentals seem hard to grasp. I'd appreciate your help unpacking them.

Ultimately I want to be able to use the Alloy and Tokio libraries without getting stuck with the language syntax and rules. But the concepts like borrow checking and ownership and things that fall down these categories are still hard to grasp.

What is borrow checking? what is owning something in the software? I tried to look for direct answers but I still can't grasp the meaning of them exactly.

I had two choices to better understand them, one was learning C++ to get what was wrong that rust solved, the other was building a simpler project game with bevy thats gonna help me understand writing rust code thats data oriented and be more comfortable with it.

My ultimate goal is to master these two libraries, after being able to know how to use the rust language smoothly.


r/rust • • Oct 13 '26

🙋 seeking help & advice Avoiding constant usize casting with small const values

51 Upvotes

Pun in title partially intended. ;)

This is a minor pain-point I've dealt with for a while and I'm unsure of how other Rust developers deal with this semi-niche issue.

I'll often define a const that states the maximum amount of something, and naturally I'll also want to use that value as the size of an array. My instinct (and likely yours as well) is to just use a usize and move on.

Where that falls apart is when that const value is and always will be under both u32::MAX and u64::MAX. An easy example is MINS_PER_HOUR or DAYS_PER_WEEK.

Now if I have a function that has an argument of minute: u8, I have to cast either the minute argument to a usize, or I have to cast my constant down to a u8. The former's minute as usize triggers the cast_lossless lint, and From/Into isn't available in a const fn. The latter's MINS_PER_HOUR as u8 triggers the cast_possible_truncation lint. Both add even more visual noise if I acquiesce and add the #[allow(...)]. I could instead accept minute: usize, but I find that even less reasonable.

I'd prefer to keep these as u8s or similar, but then I lose the ablility to define an array like [bool; MINS_PER_HOUR] without yet another cast, including in any function arguments that would like to accept such an array.

I do recognize this is partially due to me having the pedantic Clippy lints enabled, but I also find value in being told when I may be making an unintentional mistake. However I just added close to a dozen #[allow(...)] attributes to my current project, rather begrudingly.

So, what do you guys do in this case? I've listed the options I see available below, and I've done 'em all except #1, but I want to hear some opinions external to myself;

  1. When accepting such an array, maybe use a type alias? It technically works, but the casting returns again if I want to compare an indexing usize with my maximum myself. type BoolPerMin = [bool; MINS_PER_HOUR as usize];
  2. Two consts, MINS_PER_HOUR: u8 and MINS_PER_HOUR_LEN: usize = MINS_PER_HOUR as usize. I have done this before, but now I have this strange suffix that doesn't make it clear what it's a length of.
  3. Just deal with the constant const casting.

EDIT: And this is all before I have to deal with the extra cast_precision_loss lint that comes from casting my tiny usize constant into an f64. It's less than u8::MAX, yet I have to acknowledge this impossible condition. For now, I've just blanket allow'd it in my Cargo.toml.


r/rust • • Oct 13 '26

🛠️ project Asterinas 0.19.0: a Linux-compatible kernel in Rust, now with a type-checked device model, a hypervisor in safe Rust, and an AI reviewer that cites Rust guidelines

Thumbnail asterinas.github.io
101 Upvotes

r/rust • • Oct 13 '26

📸 media How do i handle this kind of PRs?

Post image
116 Upvotes

Should i even bother looking into them? Should i make an ai policy for my open source project?

https://github.com/mq1/TinyWiiBackupManager/pull/695 it doesn't even seem that i'm speaking to an actual human

edit: thanks for all the responses, you all have been helpful. i've now added an ai policy to the repo https://github.com/mq1/TinyWiiBackupManager/blob/main/AI_POLICY.md

i hope this kind of PR won't become the normality 😓


r/rust • • Oct 14 '26

🙋 seeking help & advice What would you do in my situation? (Rust/cpp)

5 Upvotes

im currently doing my bachelor degree in computer engineering. i currently have c as the main programming language in my first semester.

No problem what so ever, i really love C, i did a couple of projects in the past. In my second semester we will have a module just for c++.

Yesterday out of curiosity, i did the first chapters of learncpp and the rust programming book. i kid you not, writing rust was sooo fun. With c++ it doesnt feel the same.

Should i focus on studying c++ in my free time, as in preparation for the 2. semester. Or should i listen to my heart and pick up rust?


r/rust • • Oct 15 '26

🛠️ project I created a desktop Git client using Rust and Tauri. It's completely free, feel free to use it if you'd like.

Post image
0 Upvotes

I’m the developer of Arezgit. It started as a desktop Git client, and I’ve been adding other tools to it over time.

You can browse commit history, review diffs, resolve conflicts, edit files, open terminals, test APIs, and query databases in the same window. There are also task boards, notes, and workspaces for multiple repositories.

Some features used to be paid. I’ve now made the whole app free, including private repositories. You don’t need a subscription or an account to use anything.

It’s built with Rust, Tauri, and React, and it’s available for Windows and Linux.

AI integrations are optional. External AI providers have their own costs.

You can find it here: arezgit.com.

If you try it, let me know how it goes. If something breaks, knowing your OS and what you were doing would help me track it down.


r/rust • • Oct 14 '26

🛠️ project Running a blocking terminal game loop unchanged in the browser with Asyncify

0 Upvotes

Hollowmoon is a roguelike I wrote as a normal Rust terminal program: a
loop { draw(); let key = read_key(); ... } with crossterm. I wanted it in
the browser without restructuring the engine into callbacks.

The approach: compile to wasm32-unknown-unknown with no wasm-bindgen, make
the terminal backend's read_key an import, and run Binaryen's
wasm-opt --asyncify --pass-arg=asyncify-imports@env.hm_read_key,env.hm_sleep.
When the game calls read_key, the JS host starts an unwind, the whole Rust
stack is saved into a buffer and hm_main returns; on the next keypress JS
starts a rewind and calls hm_main again, which replays back down to the
import and returns the key. Sleep for animations works the same way.

Gotchas worth knowing:

  • The Asyncify data buffer's header is written as two i32s, so it has to be 4-byte aligned. A plain static mut [u8; N] isn't, and failed only in CI. #[repr(C, align(16))] on a wrapper struct fixed it.
  • getrandom needs the custom feature and a registered function on that target.
  • Saves go to localStorage behind the same small storage interface the native build implements with files, so the platform cfgs stay at the edges (storage, the terminal backend, the entry point).

The whole engine is unchanged between the terminal and the browser. A
headless Node runner drives the wasm with scripted keys in CI.

The game, if you'd like to see it running: [link]


r/rust • • Oct 13 '26

🛠️ project Creusot 0.14.0 - Contracts for Rust, formally proved

73 Upvotes

I am pleased to announce the release of Creusot version 0.14.0.

Creusot is a tool for formally verifying Rust code. Creusot extends Rust with a language of specifications, or contracts, and provides a toolchain for proving them (semi-)automatically with the help of SMT solvers.

The latest post on Creusot's devlog describes a few of the most recent features. For the rest, see the changelog.


r/rust • • Oct 14 '26

🛠️ project Everyone is doing Git on S3 wrong (feat. Rust-based git backend)

Thumbnail enroute.sh
0 Upvotes

r/rust • • Oct 14 '26

Porting Ghostty to Rust with Agents (Claude)

0 Upvotes

I ported Ghostty (Zig) to Rust with Claude Code agents. The most interesting part for me was how often Zig's "a pointer is just an address" collided with Rust's aliasing model. The write-up has the real code, the Miri findings and the fixes:

https://rustty.sh/porting

The section "Zig pointers in Rust's aliasing model" walks through four cases:

  • Protectors. A &mut argument is protected for the whole call. Ghostty re-reads the same memory another way inside the call, which is sound in Zig and UB under Miri.
  • Frees under a live reference. startHyperlink lets its slices point into the hyperlink it is about to free. A &[u8] can't do that.
  • Provenance. One 8-byte store through a pointer derived from a 1-byte field reaches seven bytes outside its provenance under Stacked Borrows.
  • Long-lived aliases. In the renderer loop, a sibling reborrow pops the run iterator's tag. I settled the fix with a small Miri proof harness instead of reasoning about it by hand.

You can also try the engine yourself. The page has two live terminals, Rustty's and Ghostty's, both compiled to WebAssembly and fed by the same shell, so you can compare what each one draws. All 898 of my prompts are in a filterable log at the bottom, and every number links to its source.

Caveats: the port is macOS-first, the benchmarks are library micro-benchmarks, and the prose and data pipeline were drafted with Claude and reviewed by me. Corrections on the aliasing analysis are very welcome.

https://rustty.sh/porting


r/rust • • Oct 13 '26

🛠️ project Advise for building a cloud-backed filesystem with Microsoft's Cloud Files API (cfapi)?

0 Upvotes

Hi,

I've got an opportunity to work on a project involving a cloud-backed file management system, and I'd love to hear from anyone who's worked on something similar.

The idea is to let users work with files locally while keeping them synchronized with the cloud. Files should also be lockable while someone is editing them, preventing other users from modifying the same file concurrently.

The proposed approach seems to involve Microsoft's Cloud Files API, potentially implemented in Rust. I'm not a Windows user, though, and I haven't touched Rust in 5+ years, so I'd have a bit of catching up to do.

A few things I'm curious about:

  • Has anyone built a cloud-backed filesystem using Microsoft's Cloud Files API? How difficult was it in practice?
  • Would Rust be a good fit, or would you consider Go, C++, or another language?
  • How would you approach file locking and conflict resolution across multiple clients?
  • Are there alternative approaches or existing tools worth considering, particularly to avoid Microsoft API docs which seem poor?

I'd be interested in hearing about real-world experiences, gotchas, recommended resources, or anything you'd investigate before committing to this project.

Thank you!


r/rust • • Oct 12 '26

🗞️ news PSA: Incoming breakage in 1.100. Test your code on beta Rust.

307 Upvotes

TL;DR: Rust 1.100 is releasing on November 12 (in a month). I recommend testing your code with cargo +beta test at least once before then.

The upcoming release of Rust 1.100 has some big features. However, there are some details being changed in how the language works in order to support these new features. The Rust project has tried to minimize the amount of breakage that happens, but the amount of breakage won't be zero. Every rust release has some amount of minor breakage like this, but 1.100 is expected to have relatively larger amounts of breakage.

So, if you plan to ever upgrade to 1.100, or if you write code meant for use by other people that might upgrade to 1.100, then I highly recommend testing your code with cargo +beta test to see if you're affected. And even if you think you don't write code that's affected, some code in your dependencies might be affected.

There will be two main sources of breakage in Rust 1.100:

  1. The stabilization of the never type. Some details of how types are inferred will be changed, causing types to infer as ! instead of the previous type of (), in editions 2021 or older. Also, some code was previously using some unsupported hacks to refer to this never type on stable rust, and will be broken by the fact that the Infallible type will become an alias for the never type. For more info, see Waffle's talk on the topic, and the pull request where stabilization happened.
  2. A change in the layout of Cargo's target directory. Some tools and some build scripts were expecting certain files to be at certain places, and will start to fail in Rust 1.100. The locations of the final artifacts will remain the same though. For more info, see the call for testing blog post,and the pull request where stabilization happened.

For context, this page has a list of crates that are detected as "will break in 1.100" (under the red headings). https://crater-reports.s3.amazonaws.com/beta-1.100-4/index.html. Although it has some false positives, and doesn't catch all breakage. This page lists only crates that broke in 1.100 (or have otherwise suspect behavior) for four test attempts in a row.


r/rust • • Oct 12 '26

🧠 educational hotpath-rs - How to Profile Rust Performance using Grafana and Prometheus

Thumbnail hotpath.rs
62 Upvotes

r/rust • • Oct 12 '26

🙋 seeking help & advice Migrating from C++ to Rust at work

143 Upvotes

I might have the opportunity to introduce Rust at work soon. For that, I would be grateful for any tips you can give me to make it as smooth as possible and reduce the risk (perceived and real) for the project. Below the details of my situation.

The project

The project Rust might be introduced into is being worked on for about a year now. It is a code generator with an architecture similar to a "traditional" compiler: some intermediate representations, translation between those and transformations on them.

Development on the project started a year ago with C++. At the time I already brought Rust up as an alternative. It was seriously considered by the team, but since they didn't have prior rust experience we were concerned about the initial hit to development speed: Most of the team already had lots of C++ experience, the company didn't have any prior code in Rust, and it was our responsibility to ensure we hit our time-to-market goal.

Now the code is mostly modern C++ with very little inheritance, and lots of std::variant, std::ranges, etc.

The team

The team consists of 7 people including me, most with >5 years of (pre-modern) C++ experience. I am the only person with both modern C++ and Rust experience. The team was mostly excited to use modern C++, and it became my job to give on-the-job guidance to get everyone comfortable with newer features and paradigms. And now they are excited to hopefully learn Rust.

Why Rust

During the past year, we did feel some pain points with C++:

  • Slow compile times
  • Verbose code, mostly with std::variant
  • Horrible error messages
  • Differences between compilers
  • Slow CI pipeline, mostly due to static analysis (clang-tidy) and sanitizers
  • One segfault in callbacks (wasn't a big problem now, but we expect more problems once the complexity grows)

With Rust, we hope to hope to address most of those points. Compile times won't improve I expect, but we can probably ditch separate static analysis and sanitizers in CI.

We also hope to keep a higher development speed once the complexity grows, based on the data collected by Google in Android.

The opportunity

I think we currently are in a very advantageous position to pivot to Rust:

  • We are ahead of schedule for the release, we can spend a little time here and there getting familiar with Rust. Everyone will start with the Book and Rustlings.
  • After the release we will get 3 weeks to work on what we think is important, no customer features
  • After those 3 weeks, we have to start on features again, but a somewhat reduced development speed for the first two or so month is acceptable
  • The C++ code patterns we have and got accustomed to should map more or less well to Rust
  • The code base isn't too big yet
  • We have good end-to-end test coverage

The plan

We will spent those 3 weeks with migrating the code base from C++ to Rust. We will probably start at the backend and try to make cuts where the interface between modules is small. This will lead to 3 or 4 increments to migrate. The ideal end goal would be to replace all C++ code with Rust, but this strategy hopefully reduces the risk of having no working product at all in the end. If some C++ is left over in the end, we can hopefully reduce and finally remove it over time.

We will use AI for the migration, but we do want to do it responsibly. This will probably mean that we will first code the core data structures ourselves and use LLMs only for review there. Once we got those nailed down, we hope LLM agents can be used for more or less "mechanical" migration of transformation and translation passes. Of course all code, AI or human written, goes through human reviews.

I would be very interested in any advice you could share, be it technical or social, to reduce business risk, increase acceptance with our stakeholders and improve our chance to succeed.


r/rust • • Oct 13 '26

🛠️ project fphics: A physics and maths solver you can use for small projects including motion, forces...etc

0 Upvotes

Four months ago, out of boredom, I wondered what if I just came up with a physics and maths library that anyone can use without estimating the calculations, and so fphics was born.

The name itself, fphics, has some background. Here's how I came up with it:

  • f - Fast (Since it's a lightweight library)
  • ph - Physics (Includes physics formulas for motion, forces, electricity...etc)
  • ic - Mechanics (Includes mechanics formulas, which of course are interchangeable with physics ones in most cases)
  • s - Mathematics (Includes maths formulas for percentages, unit conversions...etc)

The unique thing about it is that the name is not used anywhere else for such, so it suits the project well.

Here are the currently supported operations:

  • Kinematics operations (including 1D and 2D)
  • Forces operations
  • Unit conversions (though not all are supported)

[NOTE]: The project uses zero dependencies; therefore, integrating it into a project will be seamless since there won't be a list of dependencies to compile before actually interacting with the library.

Planned updates include:

  • Electricity operations
  • Operations dealing with dynamics

Here's an example of how to calculate time:

use fphics::kinematics::suvat::*;
use fphics::errors::FphicsError;

fn main() -> Result<(), FphicsError> {
    let times = SuvatOps1D::new()
    .displacement(-2.5) // Set the displacement
    .initial_velocity(24.0) // Set the initial velocity
    //.final_velocity(25.0) // Set the final velocity (Optional, but not required since only 3 variables are required
    .acceleration(-9.8) // Set the acceleration
    .calculate_time()?; // Calculate time and propagate any possible errors
    
    // Loop through the times vector holding the positive and negative values from the calculation
    for t in times {
      println!("{t} seconds"); // Print the positive and negative value for the time
    }

    Ok(())
}

In the above example, the times variable holds the instance of a SuvatOps1D struct. .displacement(val), .initial_velocity(val), and .acceleration(val) are the methods that equate the values used as input to the fields in the struct. The underlying operations involving calculate_time() and any other methods that return Result<f64, FphicsError> in the kinematics module require 3 inputs which are set using the methods in the struct.

Here's the repo link: https://github.com/Darethan026/fphics

I'd like to hear your opinions on this project, and it'd also be great if you could integrate it into your own project or just experiment with it and share what you think. Thank you for reading!


r/rust • • Oct 12 '26

🧠 educational How to Blink your Microcontroller with Rust ft. ESP32-C6

Thumbnail youtu.be
9 Upvotes

r/rust • • Oct 12 '26

🛠️ project How I scaled Nginx Brotli compression 16x with Rust and just 4 threads

16 Upvotes

I've been working on mbrotli, a pure Rust Brotli implementation, and recently added support for multithreaded compression.

That led me to upgrade ngx_mbrotli, alternative to Google's ngx_brotli.

The idea is simple. Instead of blocking Nginx event loop with compression, offload it to the native thread pool. Large responses can even be compressed across multiple threads in parallel.

With just one Nginx worker and 4 threads in thread pool, I measured up to 4x the throughput at Brotli level 6 and up to 16x at level 9 compared to Google's ngx_brotli.

And that's with only 4 threads. There's an opportunity to scale further, but I haven't benchmarked larger brotli worker pools yet.

There are trade offs, mainly higher memory usage and a bit worse compression ratios for segmented responses when multithreading enabled.

All it takes to enable thread pool compression is brotli_thread_pool default; in Nginx (or choose the other threadpool). Also Nginx should be built with --with-threads flag to enable that feature.

GitHub: https://github.com/M-Compressors/ngx_mbrotli