rfcs
rust
rfcs | rust | |
---|---|---|
673 | 2,728 | |
5,881 | 96,650 | |
1.2% | 1.2% | |
9.8 | 10.0 | |
7 days ago | 6 days ago | |
Markdown | Rust | |
Apache License 2.0 | GNU General Public License v3.0 or later |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
rfcs
-
Don't defer Close() on writable files
That nobody has gone through the effort of collating its requirements and writing an RFC after https://github.com/rust-lang/rfcs/pull/770 was closed (back in 2015).
I assume a big issue is that this is full of edge cases up the ass, and the value is somewhat limited in the sense that if you know you want durable writes you'll sync() and know you're fucked if you get an error, but close() does not guarantee a sync to disk, as the linux man page indicates:
> A successful close does not guarantee that the data has been successfully saved to disk, as the kernel uses the buffer cache to defer writes.
-
An Optimization That's Impossible in Rust
I never heard of "German strings" in place of the small string optimization before! And there had been way too many proposals to add such types to the standard library [1] [2] [3] [4]. My understanding is that:
1. Both `Vec` and `String` should share the same layout as part of the standard library's contract.
2. Unlike `String`, the equivalent optimization for `Vec` is more questionable especially when T might be any type. C++ standard libraries frequently do implement multiple layouts for std::string but not for std::vector for the same reason.
3. Rust never allows an implicit copying of `String` in the first place, which greatly benefits from the SSO, so the lack of SSO in Rust is less important compared to C++.
[1] https://github.com/rust-lang/rust/issues/4991
[2] https://github.com/rust-lang/rust/issues/20198
[3] https://github.com/rust-lang/rfcs/pull/2990
[4] https://github.com/rust-lang/unsafe-code-guidelines/issues/4...
- Async2 – The .NET Runtime Async experiment concludes
-
Jiff: A brand new Datetime library for Rust, from the builder of ripgrep
nrc was poking at the problem in 2016 https://internals.rust-lang.org/t/struct-field-defaults/3412 which led to this RFC https://github.com/rust-lang/rfcs/pull/1806
It got postponed because it wasn't going to make it into Rust 2018: https://github.com/rust-lang/rfcs/pull/1806#issuecomment-327...
-
Cultivating Open Source Community
You can check out Rust-langs RFC Repo to see their well-documented and thorough process for an RFC.
-
Generics in Rust: murky waters of implementing foreign traits on foreign types
Finally, I found the answer in the RFC Book (RFC stands for Request For Comments). RFC 2451 from 2018-05-30 that starts with the following lines:
-
Ask HN: What April Fools jokes have you noticed this year?
RFC: Add large language models to Rust
https://github.com/rust-lang/rfcs/pull/3603
- Rust to add large language models to the standard library
-
Why does Rust choose not to provide `for` comprehensions?
Man, SO and family has really gone downhill. That top answer is absolutely terrible. In fact, if you care, you can literally look at the RFC discussion here to see the actual debate: https://github.com/rust-lang/rfcs/pull/582
Basically, `for x in y` is kind of redundant, already sorta-kinda supported by itertools, and there's also a ton of macros that sorta-kinda do it already. It would just be language bloat at this point.
Literally has nothing to do with memory management.
- Coroutines in C
rust
-
Safe C++
> Rust was invented with an elevator firmware use cases in mind. The inventor happened to work for Mozilla, so it got traction in the lower level parts of Firefox next.
TechSpot is referring (without attribution) to an interview the MIT Technology Review did with Hoare, and tacked on a claim that Rust was invented "to prevent issues such as his elevator breaking down" that isn't there in the source material. Elevator firmware is not systems software in any case, and the Rust manual Hoare authored states:
> Rust's goals arise from the context of writing large programs that interact with the internet -- both servers and clients -- and are thus much more concerned with safety and concurrency than older generations of program.
https://github.com/graydon/rust-prehistory/blob/master/doc/r...
The language described there relies on a much larger runtime than Rust today does. It is no systems language. Later it even grew things like the @ garbage-collected pointers.
Those would eventually go away as it turned out that people writing apps don't want to think about memory at all (and are better served by using a real apps language) and Rust instead started embracing its potential as a systems language:
> Although Rust didn't start out that way, one of the most interesting applications of Rust has been very low-level programming, even down to the level of kernels. The interest in this application of Rust was something of a surprise to us, but in hindsight it makes perfect sense. Low-level control over memory management isn't something that most applications software, especially on the server side, wants; most of that software has migrated over to languages like Java, Ruby, and JavaScript that trade control and performance for convenience by making memory management automatically, and dynamically, managed by the runtime. The remaining class of software, most of which is written in C and C++, is software that must manage memory manually in order to achieve some combination of performance, simplicity, and/or the ability to self-host. The prospect of using a new language for this class of software, which includes OS kernels, game engines, and browser engines among others, is what is fueling the growth of the nascent Rust community.
https://pcwalton.github.io/_posts/2013-06-02-removing-garbag...
For a lot of systems software, and I am thinking of system service managers ("init systems") in particular, failing and restarting is not viable. OOM conditions must be recoverable. Rust has recognised this and is trying to correct the course they went down in its early days of ignoring this, being unimportant for an apps language, but vital for a systems language.
One feature they have taken to is throwing panics on OOM conditions:
https://github.com/rust-lang/rust/issues/43596
These "panics" can unwind the stack and be caught with panic::catch_unwind, but with the proviso of only "sometimes". If you take that at face value, then it's not a very useful feature. The implication in the issue linked above however is that this could become a viable way to recover from OOM conditions. And the mechanism proposed there is indistinguishable from exceptions other than that it's insisted that it has nothing to do with exceptions and that you can't rely on it catching panics for you.
-
Integration tests on Symfony with Testcontainers
The big advantages of Testcontainers in relation to Docker compose or other way of container orchestration is you can code the provisioning of container, and today already have support to Golang, Java, .NET, Node.js, Python, Rust, various other languages and of course, PHP too!
-
Windows NT vs. Unix: A design comparison
> See the somewhat recent troubles in Rust: https://github.com/rust-lang/rust/security/advisories/GHSA-q...
FYI this started out as a vulnerability in yt-dlp [1]. Later it was found to impact many other languages [2]. Rust, along with other languages, also considered it a vulnerability to fix, while some other languages only updated the documentation or considered it as wontfix.
[1]: https://github.com/yt-dlp/yt-dlp/security/advisories/GHSA-42...
[2]: https://flatt.tech/research/posts/batbadbut-you-cant-securel...
-
Google says replacing C/C++ in firmware with Rust is easy
https://github.com/rust-lang/rust/pull/128271
This one was fun too:
-
Understanding Rust and Building a Simple Calculator API from Scratch
Install Rust: To get started with Rust, you need to install it on your computer. Rust provides an installer called rustup that makes it easy to get started. You can download the installer from rust-lang.org.
-
An Optimization That's Impossible in Rust
I never heard of "German strings" in place of the small string optimization before! And there had been way too many proposals to add such types to the standard library [1] [2] [3] [4]. My understanding is that:
1. Both `Vec` and `String` should share the same layout as part of the standard library's contract.
2. Unlike `String`, the equivalent optimization for `Vec` is more questionable especially when T might be any type. C++ standard libraries frequently do implement multiple layouts for std::string but not for std::vector for the same reason.
3. Rust never allows an implicit copying of `String` in the first place, which greatly benefits from the SSO, so the lack of SSO in Rust is less important compared to C++.
[1] https://github.com/rust-lang/rust/issues/4991
[2] https://github.com/rust-lang/rust/issues/20198
[3] https://github.com/rust-lang/rfcs/pull/2990
[4] https://github.com/rust-lang/unsafe-code-guidelines/issues/4...
-
Reading Files in Rust
Rust: Install Rust from rust-lang.org.
-
Setup your own Standalone/Local Stellar Blockchain to test different Smart Contracts & dApps
Which is an implementation of Language Server Protocol for Rust programming language. It provide a lot of useful features for your development in Rust, such as code completion, syntax highlighting, inlay hints, etc. You can checkout the manual of rust analyzer to know more about it.
-
Rust's Ugly Syntax (2023)
If you encounter compiler errors that are misleading in their suggestions, or have proposals for better output in specific cases, please file a ticket: https://github.com/rust-lang/rust/issues?q=is%3Aissue+label%...
-
From Julia to Rust
Author here!
I have no idea why this blog is making the rounds again and I've learned a lot of Rust since, see my (badly benchmarked!) presentation at this year's Scientific Computing in Rust 2024:
https://www.youtube.com/watch?v=bdsBhqKOe7A
and a PR I sent in for the Rust compiler to speed it up for some low hanging fruit:
https://github.com/rust-lang/rust/pull/110477
I'll have to revisit this blog at some point and see what I should update, as well as a "From Rust to Julia" post for those that want to venture into that world as well.
What are some alternatives?
bubblewrap - Low-level unprivileged sandboxing tool used by Flatpak and similar projects
carbon-lang - Carbon Language's main repository: documents, design, implementation, and related tools. (NOTE: Carbon Language is experimental; see README)
crates.io - The Rust package registry
zig - General-purpose programming language and toolchain for maintaining robust, optimal, and reusable software.
Rust-for-Linux - Adding support for the Rust language to the Linux kernel.
Nim - Nim is a statically typed compiled systems programming language. It combines successful concepts from mature languages like Python, Ada and Modula. Its design focuses on efficiency, expressiveness, and elegance (in that order of priority).
polonius - Defines the Rust borrow checker.
Odin - Odin Programming Language
Elixir - Elixir is a dynamic, functional language for building scalable and maintainable applications
rust-gc - Simple tracing (mark and sweep) garbage collector for Rust
Rustup - The Rust toolchain installer