Tuesday, April 7, 2026
296f3fe6-c719-42df-b7fa-3ebe0c2403af
| Summary | ⛅️ Breezy in the afternoon. |
|---|---|
| Temperature Range | 11°C to 19°C (52°F to 66°F) |
| Feels Like | Low: 49°F | High: 66°F |
| Humidity | 80% |
| Wind | 15 km/h (9 mph), Direction: 247° |
| Precipitation | Probability: 96%, Type: No precipitation expected |
| Sunrise / Sunset | 🌅 06:27 AM / 🌇 07:13 PM |
| Moon Phase | Waning Gibbous (67%) |
| Cloud Cover | 37% |
| Pressure | 1018.42 hPa |
| Dew Point | 53.46°F |
| Visibility | 5.79 miles |
cellophane is a library I wrote this past week that allows you to implement a single trait and create animations like this in the linux terminal. https://github.com/km-clay/cellophane
The serde_test crate has been unmaintained for over a year now, with the repo being archived at the end of 2024. There were some outstanding issues, so I decided to take it over and release a new version with some much-needed changes. This is a breaking change, so it's version 2.0.0. Most cases should be able to simple replace serde_test = "1.x.y" with serde_test2 = "2.0.0" in Cargo.toml and have everything "just work"™. So what changed, and what's the breakage?
Token now has support for U128 and I128.Token for whatever reason, you'll need to add a fallback arm as it is now marked #[non_exhaustive].time because I was expecting five fields when there were actually six present.deserialize_any; the concrete deserializer will always be used if called. If this were done before, at least two bugs in time wouldn't have happened! Rather than relying on another dependency to test typed cases, it's now possible to ensure the format is exactly what's intended rather than approximately.#![no_std] support. While not particularly critical for tests, it is nice to be able to run without std enabled. alloc is still required unconditionally. serde to serde_core, which should improve compile times a tiny bit. 1.61 is almost four years old, so I can't imagine this is an issue for anyone. For reference, libc has an MSRV of 1.65.With the exception of downstream users who were checking unit enum variants and the (presumably rare?) users exhaustively matching on a Token, the breakage from this release should be minimal. When updating time, all I had to do was fix the couple tests that were objectively incorrect as-is; no nontrivial changes were required.
So i wanted to know you thoughts guys about Rhai vs Lua (or another one), for the use as a config / scripting language to integrate with Rust ?
Thanks in advance for the feedback
I've been learning more about memory layout, unsafe, things like that lately. I'm no expert, so I'm trying to gauge how often people actually have to care about these and how often they actually use them in production vs how much of the code is just safe and fairly normal Rust?
I've been using rust's feature-flagging system to gate features like guis and what not, but I've been running into a problem where it's annoying to work on feature code in vcode because anything seen as a "disabled feature" doesn't me to use the refactoring tools.
Basically when I hover the text is see:
code is inactive due to #[cfg] directives: feature = "egui" is disabled So I want the code gated behind the feature flag - but in development I want vscode to believe "i should be compiling all these features"
I did a quick search to see if there's a way to solve this, there's probably a setting in vscode I can set in project json but I figure'd I'd ask here while I continue my search.
Have a good one!
Hi everyone, basically I am new to Rust, just started, I am a Java guy primarily, did C, and I am pretty well set in regards to computing and CS, I am finishing an engineering degree.
I wanted to learn Rust and so I am playing around in vim, practicing without any AI and just seeing how the language feels, I like it.
Since I really like Java and I am a final fan, I like immutability, but I am seeing something that is confusing me.
When using shadowing, I am basically remembering the previous state of a variable, changing it, and reassigning that value to a new variable, the question is, how is this different in comparison to using mut?
My idea is that if I have a program that often changes the state of a variable, then mut would be used, but if I have some special cases of variables changing, the states shifting I would use shadowing.
I would appreciate any explanation and some practical uses.
Thank you all in advance and good luck Rusting!!!
I was surprised to not see this mentioned here yet so I had to make a post. :)
Reckless is currently competing with Stockfish in the superfinal (the last round with the top two engines) of TCEC, one of the most prestigious (if not the most prestigious) chess engine tournaments out there. Stockfish has won that final in the last N years and will win again this year, but this is still remarkable -- Reckless rose into the top rank of chess engines extremely quickly. To my knowledge it is the first engine not written in C or C++ that can compete at this level. See this article for some more context. A huge congrats to the team behind the engine, I'm very happy to see Rust showcased this way. Now even my dad believes me that Rust is a language worth taking seriously. :D
Also they seem to have had some compiler trouble recently that maybe we should look into. ;)
I'm working with multiple projects which requires mongodb operations.
Since, I'm from python background and very much familiar with mongoengine.
I've created this Mongo ORM library.
Would love for you to check it out! 😊
Any feedback, suggestions, or nitpicks are super appreciated 🙏
Github link: https://github.com/akay25/mangoengine
Hi r/Rust Redditors,
I'm trying to figure out the best way to distribute a commercial Rust library as a compiled binary rather than source at the request of my employer. The library is heavily async (Tokio).
Here's what I've found so far:
Has anyone found a better approach? Specifically looking for something where:
- Consumers can .await streams
- IDE hover docs and go-to-definition work
- Implementation source stays closed
Or is "ship source via private registry + legal protection" genuinely the only viable path for async Rust ? If so, I can let them know but thought I'd ask here first in case someone has experience in this area?
Thanks!
New week, new Rust! What are you folks up to? Answer here or over at rust-users!
Hi,
A few months ago I posted Gate0 here. It was my attempt to see how small an authorization engine could get before it stopped being useful.
Original post:
https://www.reddit.com/r/rust/comments/1qdx73y/gate0_a_zeroallocation_deterministic_micropolicy/
After living with that design for a while, I realized the part I actually cared about was much narrower than “policy engine” in the general sense. What I wanted was a request-time decision core with hard bounds and very boring behavior:
evaluate(principal, action, resource, context) -> Result<Decision>
So I ended up rewriting the idea into a follow-up crate, Gate1. Gate1 keeps the same basic constraints that mattered to me in Gate0: 1) bounded evaluation. 2)deterministic rule order/ deny-overrides. 3) no heap allocation during policy evaluation. 4) a small enough core that you can realistically read and audit
What changed is the default contract:
- no unsafe
- typed Principal / Action / Resource inputs
- explicit canonicalization boundary
- explicit fail-closed evaluation budget
- narrower scope overall
One important implementation detail is that conditions are compiled into a linear postfix program, keeping evaluation non-recursive and bounded. The matcher set is also intentionally small: Any, Exact, Prefix, and Set.
What it does not try to do is just as important. It does not do policy distribution, role expansion, external attribute fetching or dynamic policy syntax. The idea is that by the time data reaches Gate1, the surrounding system has already done the messy work and reduced the problem to a flat request + context evaluation.
I made it a separate crate instead of just continuing Gate0 because it stopped feeling like the next version of the same thing. The API boundary and trust boundary ended up being different enough that a split felt cleaner. Gate0 was the earlier exploration. Gate1 is the stricter core I’d actually want to embed by default.
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 official Rust Programming Language Discord: https://discord.gg/rust-lang
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.
I've been working on Dithr, a buffer-first Rust dithering and halftoning library for image pipelines, designed around typed mutable slices rather than heavyweight image container abstractions. Dithr implements 35 different halftoning/dithering methods which range from practical methods to research-grade halftoning techniques.
Features:
github: https://github.com/pbkx/dithr
crates: https://crates.io/crates/dithr
I’m a beginner in Go and I’m trying to understand the best practice for handling responses inside an HTTP handler.
When updating an item in a slice, is it better to return the success response (writeJSON) inside the loop , and then return an error (writeError) after the loop if not found or the other way?
Approach 1 (writeJSON inside loop)
for i := range tasks { if req.ID == tasks[i].ID { if req.Description != nil { tasks[i].Description = *req.Description } if req.Status != nil { tasks[i].Status = *req.Status } tasks[i].Updated_At = time.Now() writeJSON(w, http.StatusOK, APIResponse{ Success: true, Data: tasks[i], }) return } } writeError(w, http.StatusNotFound, "task not found") Approach 2 (writeJSON outside loop) found := false for i := range tasks { if req.ID == tasks[i].ID { if req.Description != nil { tasks[i].Description = *req.Description } if req.Status != nil { tasks[i].Status = *req.Status } tasks[i].Updated_At = time.Now() found = true break } } if !found { writeError(w, http.StatusNotFound, "task not found") return } writeJSON(w, http.StatusOK, APIResponse{ Success: true, Data: tasks, }) Hey everyone,
I've been working on something for a while and finally feel ready to share it. It's called GoNest basically a Go framework inspired by NestJS's architecture (modules, controllers, depedency injection, decorators-like patterns, etc).
I loved working with NestJS in the Node world but wanted something similar in Go. Couldn't find anything that scratched that itch, so I built one.
It's still early and there's a lot to improve, but it's functional and I'd genuinely love some feedback from the community.
Would love to hear what you think what's useful, what's not, what I'm doing wrong. Happy to answer any questions.
Check it here https://gonest.org
Thanks for looking!
I am just about to wrap up 100 go mistakes and how to avoid them. I saw in this subreddit that after the basics of writing good go code, Let’s go and Let’s go further by Alex Edwards is natural next step.
For people who’ve read both or one or the other, do you recommend straight up diving into let’s go further without reading let’s go?
This is the weekly thread for Small Projects.
The point of this thread is to have looser posting standards than the main board. As such, projects are pretty much only removed from here by the mods for being completely unrelated to Go. However, Reddit often labels posts full of links as being spam, even when they are perfectly sensible things like links to projects, godocs, and an example. r/golang mods are not the ones removing things from this thread and we will allow them as we see the removals.
Please also avoid posts like "why", "we've got a dozen of those", "that looks like AI slop", etc. This the place to put any project people feel like sharing without worrying about those criteria.
Can prometheus metrics collection be disabled using a feature flag (without a ton of code to check for it in each metric update)?
Afaik I can not register the metrics when the flag is disabled, but will this also result in the metrics being collected on the code's container? That might cause some perf overhead, although quite minimal I believe.
Using the go client for prom in a go app.
Code I'm trying to do this in: https://github.com/pranshu-raj-211/leaderboard
| submitted by /u/nwcs_sh [link] [comments] |
I got a few suggestions during the basic first Google search but I'm not sure about the production grade pros and cons out of that
I want stage wise multiple rules to apply on 1 event and come out of possible outcome events
stage like
transform/enrich event with more facts
actual logic on event and generate new outcome events
side effects on ourcome events
| submitted by /u/High-Impact-2025 [link] [comments] |
Hey gophers,
I’ve been looking at the indie-hacker and SaaS space recently, and it’s completely flooded with Node/Next.js boilerplates (Shipfast, etc.). It seems like in the JS ecosystem, people love paying $200+ just to skip wiring up authentication and Stripe.
But Go developers have a very different mindset. We generally prefer the standard library, value simplicity over magic frameworks, and often suffer a bit from NIH (Not Invented Here) syndrome—myself included. 😅
I've been building a lot of identical infrastructure for my recent projects and I'm playing with the idea of extracting it into a proper, clean Go boilerplate (MoR/Stripe integration, multi-tenancy, magic link auth, PostgreSQL + SQLC, etc.).
Before I go down that rabbit hole, I wanted to ask the community:
Does a premium Go boilerplate even appeal to you? Or would you rather spend the 30-40 hours wiring up billing and auth yourself just to ensure it’s done your way?
If you were to use one, what are the absolute dealbreakers? (e.g., "If it uses an ORM instead of raw SQL/SQLC, I'm out", or "It needs to use standard net/http routing").
Just trying to gauge if there is an actual pain point here for Go devs, or if the boilerplate model simply doesn't fit our culture.
Would love to hear your thoughts!
I've been writing Go for about 2 years now, but only 1–2 days a week. My background is Ruby (10+ years, SaaS and PaaS world), so I came in with a good software foundation but Go still humbled me plenty.
Most of what I've built is CLI tooling and basic web API with low traffic, with a handful of open source contributions. The thing I keep noticing is how many repos feel really mature.. a lot of the Kubernetes-adjacent stuff has people half-jokingly saying they're "too old" for the codebase. It makes me wonder where someone arriving later actually fits.
And honestly, LLMs have made my learning curve feel really strange. After a decade of building intuition the slow way, I move faster now but I'm less sure what I actually *know* vs. what I'm just prompting my way through. Anyone else feel that dissonance?
For someone with my profile, where do you see real leverage? I'd love to hear from people who found their spot, especially if the path was non-linear. Cheers
I will probably follow some links from https://www.reddit.com/r/golang/comments/1sda3vy/freecodecamp_alternatives_that_go_deeper_into/