frontpage.
newsnewestaskshowjobs

Open Source @Github

fp.

Open in hackernews

Rust project goals: Immobile types and guaranteed destructors

https://github.com/rust-lang/rust-project-goals/blob/main/src/2026/move-trait.md
34•paavohtl•1h ago

Comments

suddenlybananas•56m ago
Could someone explain this to me as someone who's never touched async Rust? What kind of useful patterns would this allow for?
aabhay•45m ago
It makes it easier to write recursive async functions. It makes it easier for async functions to borrow rather than clone from their outer scope.

All really awesome, non controversial and ergonomic things.

simonask•42m ago
The big one is scoped tasks, or structured concurrency.

Currently, Rust has scoped threads: Threads that are guaranteed to terminate before the function that spawned them returns. This is powerful because it allows you to pass references to data that lives on your own stack to threads that you spawn, without any bookkeeping or synchronization mechanism - just the normal borrow checker rules.

For example, you can allocate a large array, then split it into multiple non-overlapping slices, and then have a group of threads populate each slice, all in safe Rust code.

But the same isn't true for async tasks in Rust, because futures are just objects representing a state machine, and they don't get any special treatment. In particular, they carry no guarantee that the state machine will actually run to completion, which is fundamentally different from how functions run (stack frames are guaranteed to unwind in some way, either by returning or panicking, unless the entire program has terminated).

To make the situation worse, there are many cases where Rust futures are much more prone to cancellation than synchronous code, because that is also one of the big benefits of using async in the first place - for example, you may be running multiple futures in parallel, pick the result from the one that finishes first, and then cancel the rest.

Getting this stuff under control is why people say that "async cancellation" is a difficult problem to solve, and that is true in all languages that have async. These traits will hopefully make it much easier to work with in Rust.

(There are also many other interesting things you could do with this, unrelated to async. Immovable and unforgettable are both interesting properties of an object that could be used to design many cool APIs in general.)

Tazerenix•52m ago
More algebraic effects being retrofitted onto Rust.
OskarS•37m ago
mem::forget isn’t the only way you can safely leak a value, you can do it with reference cycles too, right? And there is no way for the compiler to detect that?

Isn’t that why mem::forget is safe, because you can always implement it yourself safely? How do you get around that?

skitter•27m ago
By doing the same as with `Sized`: Automatically including the `Forget` bound on generic parameters and letting methods that don't need to be able to forget them opt out. That way existing code continues to compile and existing unsafe code doesn't become unsound.
stymaar•16m ago
> mem::forget isn’t the only way you can safely leak a value, you can do it with reference cycles too, right? And there is no way for the compiler to detect that?

But there's an easy solution for that: you make the reference-counted smart pointers require their pointee type to be Forget. It will be like how Arc<T> doesn't implement Send unless <T: Sync>.

stymaar•20m ago
Great new! Since 2016 or so it became apparent that immovable types were a crucial missing part of Rust, but for a long time it was believed it wouldn't be possible to add them without breaking everything, which is why we ended up with the Pin hack.

I'm very glad they found a way to add it eventually, as it's really filling a glaring hole in the language.

skitter•17m ago
Although not part of the goal, it also mentions `!Destruct`/"must-move types", aka linear types: Instead of there always being a way to drop values without providing any arguments, if you wanna get rid of a value of a linear type you have to call a function that takes it by value.

Don't be a meat proxy

https://gruhn.me/blog/2026-08-03/
283•ngruhn•1h ago•112 comments

Qwen3.8-Max: A New Bar for Coding and Cowork

https://qwen.ai/blog?id=qwen3.8
485•ai2027•5h ago•213 comments

More German than many Germans

https://mertbulan.com/more-german-than-many-germans/
154•mertbio•2h ago•48 comments

Rust project goals: Immobile types and guaranteed destructors

https://github.com/rust-lang/rust-project-goals/blob/main/src/2026/move-trait.md
35•paavohtl•1h ago•10 comments

Show HN: Isopolis – Isometric pixel map of SF

https://sf.isopolis.city/
197•nuwandavek•7h ago•43 comments

AI migrated legacy COBOL programs to Java, bugs included

https://arxiv.org/abs/2607.28271
47•felineflock•5h ago•34 comments

Karpathy’s Pelican

https://twitter.com/karpathy/status/2083749667410727319
551•delichon•1d ago•387 comments

Show HN: ssh ssh.place

https://ssh.place
103•jeninh•7h ago•54 comments

Why we write our own C and C++ inference engines

https://localai.io/blog/why-we-write-our-own-engines/
41•eatonphil•2d ago•21 comments

Convergence is not enough

https://www.inkandswitch.com/livelymerge/notebook/lm-02/
28•zdw•6d ago•2 comments

CP/M-386 – CP/M for 386 protected mode, derived from CP/M‑68K

https://github.com/johnsonjh/cpm386
63•TMWNN•7h ago•25 comments

Show HN: A Handwritten Blogging Platform

https://handwritten.blog/
94•emilesilvis•3d ago•46 comments

Autoregressive Language Model on the 6502 Processor

https://mattbeton.com/blog/bitnet-6502.html
101•nmstoker•2d ago•10 comments

Show HN: Kakehashi – Experimental userspace to run macOS binaries on Linux ARM

https://github.com/wie-project/kakehashi
212•vlad_kalinkin•15h ago•51 comments

Note-Taking and Personal Knowledge Management

https://unattributed.cc/note-taking-and-personal-knowledge-management
190•surprisetalk•5d ago•52 comments

Developers are attached to tools because tools encode trust

https://stackoverflow.blog/2026/07/29/developers-are-attached-to-tools-because-tools-encode-trust/
203•HieronymusBosch•4d ago•110 comments

Why Book Corners won't sync contributions back to OpenStreetMap

https://www.andreagrandi.it/posts/why-book-corners-wont-sync-contributions-back-to-openstreetmap/
84•pizzaiolo•7h ago•52 comments

SwiftUI After 7 Years

https://ykvm.com/2026/07/swiftui-a-story-of-mediocrity/
184•mpweiher•13h ago•161 comments

Emulating ALiBi with Rope

https://alexlitzenberger.com/blog/emulating_alibi_with_rope
3•alexlitz•3d ago•0 comments

Read the novels and forget everything else

https://hedgehogreview.com/web-features/thr/posts/read-the-novels-and-forget-everything-else
92•samclemens•2d ago•72 comments

The myth of Snow Leopard

https://www.rubenerd.au/the-myth-of-snow-leopard/
90•speckx•13h ago•76 comments

RFC 9851: TLS 1.2 is in Feature Freeze

https://www.rfc-editor.org/rfc/rfc9851.html
33•Jimmc414•6h ago•9 comments

Norway became a global salmon behemoth. Now it's facing the consequences

https://www.abc.net.au/news/2026-07-28/how-norway-s-salmon-industry-became-a-global-behemoth/1069...
145•CHB0403085482•6d ago•104 comments

How the words we teach English language learners changed

https://pudding.cool/2026/07/essential-words/
213•c-oreills•16h ago•158 comments

Show HN: Make your Framework 12 sound like a creaky door

https://github.com/ArcaEge/creakwork12
82•arcaege•11h ago•13 comments

The Computational Theory of Mind (2015)

https://plato.stanford.edu/entries/computational-mind/
59•cyanregiment•9h ago•43 comments

My personal AI benchmark: “Generate an SVG of a frog with a Habsburg jaw”

https://frogs.vaguespac.es/
137•thebigship•12h ago•69 comments

Show HN: NixOS-DGX-Spark – Nix and NixOS on the DGX Spark

https://github.com/graham33/nixos-dgx-spark
115•graham33•15h ago•33 comments

When transit passes were designed by hand (2022)

https://letterformarchive.org/news/milwaukee-transit-passes/
135•nate•2d ago•31 comments

Rooting, firmware analysis and persistent credentials of TP-Link TL-841N

https://blog.juni-mp4.com/posts/42/rooting-the-tplink-tl841n-pt1/
106•mindracer•15h ago•24 comments