rust-lang/rust
View on GitHub ↗ ★ 120,971 Rust
Empowering everyone to build reliable and efficient software.
1,825 mentions on Hacker News by 819 people: 158 stories, 1,667 comments · first 2012-01-20 · latest 2026-10-22
20082026
-
…The main issue is that it's very hard to propagate information found through matching . [0]: https://github.com/rust-lang/rust/pull/120131
comment by demurgos · 2024-03-28 · in A step beyond Rust's pattern matching -
…[3] - https://blog.rust-lang.org/2023/11/09/parallel-rustc.html [4] - https://github.com/rust-lang/rust/issues/39915
comment by nindalf · 2024-03-18 · in Cranelift code generation comes to Rust -
…STL but languages and compilers struggle to emit the cmov properly (Rust’s been broken for 6 years: https://github.com/rust-lang/rust/issues/53823 ). Prefetch is an interesting one because while you do optimize the binary search in a micro…
comment by vlovich123 · 2024-03-16 · in Algorithms for Modern Hardware -
…up the details, but IIRC at least Windows? Implementations of the standard library mutexes are here https://github.com/rust-lang/rust/tree/master/library/std/sr... And of course it’s pthreads on Linux.
comment by steveklabnik · 2024-03-06 · in Dada, an experimental new programming language -
…now (hard to tell because it hasn't been close enough to stabilization to be properly documented): https://github.com/rust-lang/rust/pull/68524 As for Polonius changing the underlying mental model, I think this is a natural progression.…
comment by kibwen · 2024-03-05 · in Borrow checking without lifetimes -
…and you can't pass values into resume and get them out from the yield statement in the coroutine ( https://github.com/rust-lang/rust/issues/43122#issuecomment-... ). > and they aren't separate from async, they're the foundation that async…
comment by logicprog · 2024-03-05 · in Borrow checking without lifetimes -
…a thread is spawned before a signal is generated (& right after the signal handler is installed): https://github.com/rust-lang/rust/blob/26907374b9478d84d766a... It doesn't look like there's any UB behavior being relied upon but I could…
comment by vlovich123 · 2024-03-03 · in Why do we need for an Undefined Behavior Annex to C++ -
…and there is a chance this doesn't get stabilized, but here's hoping it makes it through! [0]: https://github.com/rust-lang/rust/pull/107606 [1]: https://cohost.org/oli-obk/post/165584-ranged-integers-via [2]:…
comment by mbStavola · 2024-03-02 · in Ada 95: The Craft of Object-Oriented Programming -
…for SIGSEGV and checks if the faulting address falls within the range of the stack guards. See https://github.com/rust-lang/rust/blob/411f34b/library/std/s... The stack guards would normally be setup by the system runtime (e.g. kernel in…
comment by wahern · 2024-03-02 · in Why do we need for an Undefined Behavior Annex to C++ -
…you can e.g. target a RTOS or whatever. It looks like that work started really recently actually: https://github.com/rust-lang/rust/commit/99128b7e45f8b95d962...
comment by IshKebab · 2024-02-29 · in Talc – A fast and flexible allocator for no_std and WebAssembly -
The issue in question, https://github.com/rust-lang/rust/issues/49206 , is such an edge case that there are 0 known examples of it causing a problem in practice, despite the issue being around for many years.
comment by Georgelemental · 2024-02-21 · in Cve-rs: Fast memory vulnerabilities, written in safe Rust -
…in practice. If there are problems with Rust's type system, they're identified and patched. [1]: https://github.com/rust-lang/rust/issues/25860#issuecomment-...
comment by pcwalton · 2024-02-21 · in Cve-rs: Fast memory vulnerabilities, written in safe Rust -
> unsound issues Apparently there's 84 open issues which the Rust developers consider unsound issues. https://github.com/rust-lang/rust/issues?q=is%3Aissue+is%3Ao... That's it. Rust's claims are over and done with. How can it be safe if…
comment by jart · 2024-02-21 · in Cve-rs: Fast memory vulnerabilities, written in safe Rust -
https://github.com/rust-lang/rust/issues/25860#issuecomment-... “Similarly, the reason why niko's approach is not yet implemented is simply that getting the type system to a point where we even can implement this is Hard. Fixing this bug…
comment by anderskaseorg · 2024-02-20 · in Cve-rs: Fast memory vulnerabilities, written in safe Rust -
…constraints like this become explicit but inferred? Sort of like this proposal from the GH issue: https://github.com/rust-lang/rust/issues/25860#issuecomment-... but the "where" clause is inferred at compile time. If so I wouldn't call…
comment by nicklecompte · 2024-02-20 · in Cve-rs: Fast memory vulnerabilities, written in safe Rust -
Seems to rely on at least one known compiler bug (admittedly one open since 2015) https://github.com/rust-lang/rust/issues/25860
comment by dralley · 2024-02-20 · in Cve-rs: Fast memory vulnerabilities, written in safe Rust -
…regressions and in some cases it may even cause unnecessary stack spilling of sensitive data: https://github.com/rust-lang/rust/issues/88930#issuecomment-...
comment by newpavlov · 2024-02-06 · in Avoiding register spills in vectorized code with many constants -
Mind you that there is a runtime overhead. If we look at access beyond on a slice's boundary: https://github.com/rust-lang/rust/blob/ea37e8091fe87ae0a7e20... This bounds check is what enables Rust code to fail with a panic vs continuing…
comment by WirelessGigabit · 2024-02-05 · in New Linux glibc flaw lets attackers get root on major distros -
There was a similar bug in the past in Rust: Integer overflow causing a buffer overflow: https://github.com/rust-lang/rust/pull/54399/commits/8ac88d3... So the answer is: Not necessarily. I agree though that the memory safety features in…
comment by uecker · 2024-02-04 · in New Linux glibc flaw lets attackers get root on major distros -
…of this kind of noise. It's not like heap overflows are impossible in other languages. Consult https://github.com/rust-lang/rust/issues/80894 or consult your preferred CVE database. Would love to know what language the author thinks glibc…
comment by stonogo · 2024-02-01 · in "No way to prevent this" say users of only language where this regularly happens -
…pay for what you use” when the binaries contained half of H. P. Lovecraft's œuvre. See issue #13871 https://github.com/rust-lang/rust/issues/13871 I exaggerate, point is that we've come a long way and are still getting better. Different…
comment by weinzierl · 2024-01-24 · in Making Rust binaries smaller by default -
…part of code [1] and somehow it is still in the std even though other algorithms now exist [2]. [1] https://github.com/rust-lang/rust/pull/24612 [2] https://github.com/rust-lang/rust/issues/52811
comment by lifthrasiir · 2024-01-24 · in Making Rust binaries smaller by default -
…this by turning on the CPU feature directly, but that doesn't seem to affect codegen in this case. https://github.com/rust-lang/rust/issues/21690 It would be nice to get these intrinsics stabilized, at least. EDIT: oops you figured this…
comment by steveklabnik · 2024-01-23 · in From slow to SIMD: A Go optimization story -
…to work: https://godbolt.org/z/G4Enf59Kb Edit: from what I can tell this is still an open issue??? https://github.com/rust-lang/rust/issues/21690 Edit: relevant SO post: https://stackoverflow.com/questions/76055058/why-cant-the-ru...…
comment by camel-cdr · 2024-01-23 · in From slow to SIMD: A Go optimization story -
Here's the code performing the allocation reuse: https://github.com/rust-lang/rust/blob/25f8d01fd8bda339612d0... It's not supposed to waste more space than a regular `collect()` or `push()` would when growing the capacity exponentially.
comment by pornel · 2024-01-19 · in Identifying Rust's collect:<Vec<_>>() memory leak footgun -
…documentation is slightly wrong, and no copies occur. Edit: I submitted a PR to clear up the docs: https://github.com/rust-lang/rust/pull/120110
comment by invpt · 2024-01-18 · in Identifying Rust's collect:<Vec<_>>() memory leak footgun -
…it would be interesting to catch regressions before they land. Someone already filed this as a bug: https://github.com/rust-lang/rust/issues/120091
comment by the_mitsuhiko · 2024-01-18 · in Identifying Rust's collect:<Vec<_>>() memory leak footgun -
…as a pure language perhaps not, but Rust as an ecosystem, has a standard UEFI alloc/dealloc system: https://github.com/rust-lang/rust/blob/master/library/std/sr... One could, of course, write their own allocator and heap tracking system as…
comment by jeroenhd · 2024-01-17 · in PixieFail: Nine Vulnerabilities UEFI Implementations -
…o/g/devel/search?p=recentpostdate%2Fsti... Rust also has a basic standard library implementation now: https://github.com/rust-lang/rust/pull/105861
comment by jeroenhd · 2024-01-17 · in PixieFail: Nine Vulnerabilities UEFI Implementations -
…I happened to be reading the Rust 1.75.0 release notes today and fell into this 50-tab rabbit hole: https://github.com/rust-lang/rust/pull/113053/
comment by fl0ki · 2024-01-16 · in Std: Clamp generates less efficient assembly than std:min(max,std:max(min,v)) -
Yup! https://github.com/rust-lang/rust/issues/12037
comment by steveklabnik · 2024-01-16 · in A lowering strategy for control effects in Rust -
…got me down this rathole: https://users.rust-lang.org/t/fixing-rusts-webassembly-targe... and https://github.com/rust-lang/rust/issues/83788 I did find older alternative solutions that uses wasm32-unknown-emscripten, like…
comment by FullyFunctional · 2024-01-16 · in Show HN: A minimal working Rust / SDL2 / WASM browser game -
Looks like rust is reasonably well working with cygwin/msys2 based on some github issues, https://github.com/rust-lang/rust/issues/79854 . Given that, I'd expect that this rust rewrite should work under them at least. Though it's obviously…
comment by simcop2387 · 2024-01-16 · in Fishshell rewrite-it-in Rust progress: 100% -
See https://github.com/rust-lang/rust/issues/9795 and the linked PR that removed them.
comment by steveklabnik · 2024-01-16 · in A lowering strategy for control effects in Rust -
…unsafe code to implement any non-trivial data structures That seems like a gross overstatement. https://github.com/rust-lang/rust/blob/master/library/std/sr... CTRL-F: unsafe Only one result, an optional utility function: "pub unsafe fn…
comment by jbboehr · 2024-01-15 · in OpenD, a D language fork that is open to your contributions -
…standard library. According to bing.com chat, https://github.com/dotnet/runtime has 3.5M LOC, and https://github.com/rust-lang/rust has 6M LOC. The right panel of https://github.com/dotnet/runtime says 80% of the .NET runtime is written in…
comment by Const-me · 2024-01-15 · in OpenD, a D language fork that is open to your contributions -
Both (line-buffered stdout, raw stderr) date to the initial implementation 10 years ago: https://github.com/rust-lang/rust/commit/94d71f8836b3bfac337... . The commit message mentions that stderr is no longer buffered (probably as a result…
comment by loeg · 2024-01-10 · in Why is stdout faster than stderr? -
…As far as I know, there is currently no way to deny unsafe code in the output of proc macros. [0] https://github.com/rust-lang/rust/pull/52467
comment by LegionMammal978 · 2024-01-09 · in totally_safe_transmute, Line-by-Line (2021) -
…absolute requirement that "newly added" functions cannot be stabilized. Off the top of my head: https://github.com/rust-lang/rust/issues/111544 `OsStr::as_encoded_bytes` was proposed in 2023-05, finished being implemented in 2023-07,…
comment by Arnavion · 2023-12-29 · in You can't do that because I hate you -
…issues, etc. is a totally separate discussion from "Rust thinks four year old code is new" [0]: https://github.com/rust-lang/rust/commit/c784720f3a2d0b66142...
comment by shepherdjerred · 2023-12-29 · in You can't do that because I hate you -
…the standard tracking issue template that lists any blockers, stabilization steps, etc. (Compare to https://github.com/rust-lang/rust/issues/119364 that happens to be the newest "Tracking issue" atm.) Also since the OP didn't intend for it…
comment by Arnavion · 2023-12-28 · in You can't do that because I hate you -
…to being "newly added". Where did you get this from? The tracking issue says nothing of the sort: https://github.com/rust-lang/rust/issues/61695
comment by shepherdjerred · 2023-12-28 · in You can't do that because I hate you -
…since that point, unfortunately, or if something similar could be applied to C++ somehow. [0]: https://github.com/rust-lang/rust/issues/47317#issuecomment-...
comment by aw1621107 · 2023-12-19 · in C++ Should Be C++ -
…https://www.jsdocs.io/package/ts-results-es#package-index [1] https://github.com/rust-lang/rust/issues/66249 [2] https://github.com/lune-climate/ts-results-es
comment by jstasiak · 2023-12-19 · in Tsdocs.dev: Type docs for any JavaScript library -
…is supposed to be. It is explicitly not a spec[3], but the project is working on one[4]. 1: https://github.com/rust-lang/rust/issues?q=is%3Aopen+is%3Ais... 2: https://doc.rust-lang.org/reference/introduction.html 3:…
comment by estebank · 2023-12-19 · in Progress toward a GCC-based Rust compiler -
…to verify for yourself without having the risk of being mislead by any person might tell you: https://github.com/rust-lang/rust/tree/master/compiler
comment by estebank · 2023-12-18 · in Progress toward a GCC-based Rust compiler -
…in rustc. One example is generators[1] but there's a longer list in The Unstable Book.[2] [1] https://github.com/rust-lang/rust/issues/43122 [2] https://doc.rust-lang.org/stable/unstable-book/language-feat...
comment by nequo · 2023-12-18 · in Progress toward a GCC-based Rust compiler -
…pairs of method names were considered better. [1] https://github.com/rust-lang/rfcs/pull/2757 [2] https://github.com/rust-lang/rust/issues/64260
comment by lifthrasiir · 2023-12-16 · in Bug in my code from compiler optimization [video] -
`rustc` used to use different terminology than the nomicom, but this is no longer the case: https://github.com/rust-lang/rust/pull/107339
comment by Georgelemental · 2023-12-05 · in Common Rust Lifetime Misconceptions (2020) -
This is not true anymore: https://github.com/rust-lang/rust/pull/107339
comment by Georgelemental · 2023-12-05 · in Common Rust Lifetime Misconceptions (2020)