Hello and welcome to another issue of This Week in Rust! Rust is a systems language pursuing the trifecta: safety, concurrency, and speed. This is a weekly summary of its progress and community. Want something mentioned? Tweet us at @ThisWeekInRust or send us an email! Want to get involved? We love contributions.
This Week in Rust is openly developed on GitHub. If you find any errors in this week's issue, please submit a PR.
This week's edition was edited by: Vikrant and llogiq.
Updates from Rust Community
News & Blog Posts
- Dealing with multiple error types in Rust.
- Memory leaks are memory safe. Understanding memory safety and memory leaks.
- You probably meant to use
.chars().count()
. How to get the "length" of a string. - Writing Varnish Cache modules (VMOD) in Rust.
- Understanding the performance characteristics of regex crate.
- [machine learning] Naive Bayes Classifiers in Rust.
- This week in Servo 58.
Notable New Crates & Project Updates
- токамак. Rust IDE package for Atom.
- fancy-regex. A pure-Rust hybrid regular expression implementation.
- RustPrimer. Rust primer for beginners (in Chinese). English translations underway.
- Screech. Implementation of the Noise Protocol Framework in Rust.
- Rusty Secrets. Rust implementation of threshold Shamir secret sharing.
- Rustler. Safe Rust bridge for creating Erlang NIF functions.
Crate of the Week
This week's Crate of the Week is gcc, a crate to easily use the local C compiler, which makes FFI with a build script a breeze. Thanks to Ulrik Sverdrup for the suggestion!
Submit your suggestions for next week!
Call for Participation
Always wanted to contribute to open-source projects but didn't know where to start? Every week we highlight some tasks from the Rust community for you to pick and get started!
Some of these tasks may also have mentors available, visit the task page for more information.
- [easy] rust: Add error explanations for all error codes.
- [easy] rust: rustbuild seems to deal badly with poor internet connections.
- [medium] regex: Decrease memory usage of DFA with variable width delta encoding of instruction pointers.
- [less easy] servo: Store a
Box<Iterator>
instead ofBox<CollectionFilter>
inHTMLCollection
. - [easy] токамак: Test cases for CI.
- [easy] rexiv2: Results should likely use our own aliased Error (and Result?) type.
- [easy] rexiv2: Provide access to full XML XMP packet.
If you are a Rust project owner and are looking for contributors, please submit tasks here.
Updates from Rust Core
89 pull requests were merged in the last week.
Notable changes
- Faster Overlap checking (fixed a rustc perf regression)
- Arc::downgrade no longer loops infinitely
- Function calls no longer need to store all returns on stack
- 'Consider the semicolon' help now more helpful
- Specialize
==
for[T]
and[u8]
tomemcmp
(alsoOrd
,PartialOrd
) - File IO buffer size now 8K
- AST now can represent
pub(restricted)
- Prepare private-in-public checker for
pub(restricted)
- Simplified AST
StructField
- Restrict atomic intrinsics to integers
- Save/Load the dependency graph for incremental compilation
- Release notes for 1.8 (gearing up for release)
New Contributors
- Timon Van Overveldt
- Tom Tromey
- Varun Vats
- vlastachu
Approved RFCs
Changes to Rust follow the Rust RFC (request for comments) process. These are the RFCs that were approved for implementation this week:
- RFC 1513: Stabilize implementing panics as aborts.
- RFC 1444: Provide native support for C-compatible unions, defined via a contextual keyword
union
. - RFC 1398: Add a standard allocator interface and support for user-defined allocators.
- Amend RFC 550 with misc. follow set corrections.
Final Comment Period
Every week the team announces the 'final comment period' for RFCs and key PRs which are reaching a decision. Express your opinions now. This week's FCPs are:
- Add
#[repr(pack = "N")]
. - Feature gate extern fn methods.
- Allow Drop types in statics/const functions.
- Add a new crate-type, rdylib.
- Add workspaces to Cargo.
- Stabilize the
-C overflow-checks
command line argument. - Add more integer atomic types.
- Add a generic
Atomic<T>
type. - Remove some kinds of doc comments.
- Amend RFC 1228 with operator fixity and precedence.
New RFCs
- Support code generators with source maps and multiple source directories.
- Introduce more conventions around documenting Rust projects.
- Add a
vis
matcher tomacro_rules!
that matches valid visibility annotations. - Add a
literal
fragment specifier formacro_rules!
patterns that matches literal constants. - Rust memory model.
Upcoming Events
- 4/12. (San Diego) Eat– Drink– Rust! Downtown Rust Meetup.
- 4/13. Introduction to Rust, The Arts and Science University of Chiapas.
- 4/13. Rust Community Team Meeting at #rust-community on irc.mozilla.org.
- 4/13. Rust Boulder/Denver Monthly Meeting.
- 4/14. Columbus Rust Society.
- 4/15. Frankfurt/Main Rust Lint Workshop
- 4/18. Rust Paris.
- 4/20. OpenTechSchool Berlin: Rust Hack and Learn.
If you are running a Rust event please add it to the calendar to get it mentioned here. Email Erick Tryzelaar or Brian Anderson for access.
fn work(on: RustProject) -> Money
- Senior full stack developer at OneSignal.
- PhD and postdoc positions at MPI-SWS.
Tweet us at @ThisWeekInRust to get your job offers listed here!
Quote of the Week
No quote was selected for QotW.