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
-
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] -
▲ 4
Fuchsia is now a part of Rust CIstory by dannyrosen · 2023-12-12 · 0 comments
-
`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) -
Here is the original GitHub issue on the question: https://github.com/rust-lang/rust/issues/15699 And an RFC by some people that felt frustrated by this arguably implementation-centric view that kind of lost steam:…
comment by cwzwarich · 2023-12-05 · in Common Rust Lifetime Misconceptions (2020) -
…14 bugs https://gcc.gnu.org/bugzilla/buglist.cgi?quicksearch=Ada%20s... Rust: 243 (plus 830 closed) https://github.com/rust-lang/rust/issues?q=is%3Aissue+is%3Ao... Choose by yourself which seems safer
comment by rurban · 2023-12-02 · in Is Ada safer than Rust? -
…is often far from perfect, it at least has been widely tested as a general-purpose allocator. [0] https://github.com/rust-lang/rust/issues/36963
comment by kelnos · 2023-11-30 · in Rust std fs slower than Python? No, it's hardware -
…less clear to me: You can find them at the original motivation for removing jemalloc, 7 years ago: https://github.com/rust-lang/rust/issues/36963 Also it's not "glibc's allocator", it's the system allocator. If you're unhappy with glibc's,…
comment by masklinn · 2023-11-29 · in Rust std fs slower than Python? No, it's hardware -
…feel free to test it out and open an issue, but maybe take a gander at the previous attempt: https://github.com/rust-lang/rust/pull/103944 which died for the exact same reason the the one before that (…
comment by masklinn · 2023-11-29 · in Rust std fs slower than Python? No, it's hardware -
…function as inline. Essentially rustc converted it from an intrinsic to a regular function call. https://github.com/rust-lang/rust/issues/107617#issuecomment...
comment by celeritascelery · 2023-11-28 · in Designing a SIMD Algorithm from Scratch -
…the old search). It's as simple as appending the repo URL, starting from github.com: e.g. sourcegraph.com/github.com/rust-lang/rust/ (you can try searching for unit on this repo)
comment by bilkow · 2023-11-27 · in GitHub: Can no longer search code without being logged in -
…smart pointers defined outside of std. Box patterns are likely to be superseded by one of these: https://github.com/rust-lang/rust/issues/42640 https://github.com/rust-lang/rust/issues/87121
comment by ForkMeOnTinder · 2023-11-23 · in Enums in Rust – and why they feel better -
…because those foreign functions may start making unsynchronised calls to getenv/setenv. [1] https://github.com/rust-lang/rust/blob/master/library/std/sr... [2] https://github.com/rust-lang/rust/blob/master/library/std/sr...
comment by Measter · 2023-11-20 · in Setenv Is Not Thread Safe and C Doesn't Want to Fix It -
It was orginally me ( https://github.com/rust-lang/rust/pull/65875 )
comment by Matthias247 · 2023-11-10 · in A four year plan for async Rust -
…common types and patterns it's probably easier to find the information you're looking for, e.g.: https://github.com/rust-lang/rust/issues/46213 In general Rust chases a "zero cost abstraction" ethos, so a lot of the type system niceties…
comment by inferiorhuman · 2023-11-10 · in Why Rust in Production? -
Here is one I know of: https://github.com/rust-lang/rust/pull/90346 I believe this is one as well: https://github.com/rust-lang/rust/pull/113535
comment by steveklabnik · 2023-11-08 · in Officially Qualified – Ferrocene -
…you don't understand are bugs and I'd encourage you all to file a ticket when encountering any: https://github.com/rust-lang/rust/issues/new?assignees=&labe...
comment by estebank · 2023-11-07 · in Why Golang instead of Rust to develop the Krater desktop app -
As far as I know, the proposal to add one was determined to need an RFC: https://github.com/rust-lang/rust/pull/65875
comment by steveklabnik · 2023-11-07 · in A four year plan for async Rust -
…for UBSAN, ASAN, TSAN and MSAN sanitizers. Unfortunately it has been WIP for almost 7 years: https://github.com/rust-lang/rust/issues/39699
comment by menaerus · 2023-11-02 · in Bjarne Stroustrup's Plan for Bringing Safety to C++ -
…which wasn’t very useful. I wasn’t happy with this, and so proposed turning into a macro < https://github.com/rust-lang/rust/issues/8991 >, which fixed both of those problems. The import thing alone could have been resolved by adding it to…
comment by chrismorgan · 2023-10-27 · in Things I like about Gleam's Syntax