This Week in Rust
Hello and welcome to the tenth issue of This Week in Rust. This week marks the enabling of the new runtime written entirely in Rust. A lot happens every week, so I’m going to start omitting PRs that I deem of lesser importance. This process is entirely arbitrary, don’t feel hurt if I exclude your PR :).
What’s cooking on
Issue churn was -12 this week. A total of 70 PRs were merged.
The new runtime has been enabled by
default. This is the culmination
of a lot of work by brson and the rt interns (toddaaro, bblum, and ecr being
the ones I know of). It’s written entirely in Rust, and lives in
Additionally, the old C++ runtime has been
- Trailing nulls have been removed from all string
types.. This will break your
FFI code in subtle and mysterious ways, if you didn’t explicitly use the
as_c_strmethods. FFI code using the new
str::c_strcode will be more robust, as it forbids interior nulls, and ensures that a trailing null always exists. The replacement for
str.to_c_str().as_slice(), from what I can tell.
privkeyword is no longer allowed where it has no meaning.
iter_errin Result have been replaced with external iterators.
Resulthas been removed in favor of
unwrap. They both did the same thing, which was useless duplication.
std::stackwalkhave been removed, as they are obsolete with the new runtime.
- The transitionary
foreachhas been removed.
Notable library additions, bugfixes, and cleanup
- Some redundant
Ordmethods were removed from impls where the default methods sufficed.
- FromStr for IpAddr and SocketAddr is implemented.
- Work steealing is implemented for the newrt scheduler.
- A frequency counting function has been added to
- Saturating math is now implemented. I knew this as “clamping”: it is arithmetic that clamps results into a specific interval.
- A hexadecimal encoding module
has been added to
EnumSethas been moved into
extra, it previously existed as a utility in
str::is_utf8has seen some more optimization.
Notable compiler additions, bugfixes, and cleanup
- Initial support for the new formatting code has been added.
no_mainattribute has been added, to omit the Rust entry point entirely.
- Vanilla Linux on ARM is now supported.
- Extra copies of rvalues are no longer omitted.
- Some cross-arch bugs with node hash metadata have been fixed.
- A soundness bug in struct matching has been fixed.
option_env!syntax extension has been added for compile-time inclusion of environment variables that may or may not be present.
extern mod a = "b/c/d"has been implemented, paving the way for more rustpkg awesomeness.
to have been a bit under-attended. SIMD, ARM, trailing nulls, order of
use, and the condition system were all briefly discussed..
Discussion + Blog posts
- “A Work-stealing Runtime for Rust”, toddaaro’s intern presentation.
- “Iterator Blocks for Rust – Feature Survey”
- Galvanized: a simple JIT VM written in Rust, using LibJIT
- Q3 has a new logger. I think it’s nicer than the built-in one!
- rust-protobuf: a protobuf implementation generating rust code, written in rust.
- Servo: almost passing acid1 !