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 a pull request. Want to get involved? We love contributions.
Updates from Rust Community
News & Blog Posts
- Rust is the most loved language in Stack Overflow Developer Survey, again.
- WebRenderer landed in Firefox Nightly. WebRender is an experimental render backend written in Rust.
- Handling exceptions. Part of the series Writing an OS in Rust.
- Writing an audio plugin in Rust.
- Wouldn't it be neat if you could write C++ inline in Rust?
- Rust and RPC - OkCupid Hackweek 2017.
- Unification in Chalk, part 1. Chalk is a PROLOG-ish interpreter written in Rust, intended eventually for use in the compiler.
- Polymorphism in Rust: Enum vs Trait + Struct.
- Using Rust in Windows.
- How to implement a trait for
- Rust support has landed in upstream vim.
- Redox 0.1.3 released with better VirtualBox integration.
- Speakers for RustFest 2017 announced. 30 April at Kyiv, Ukraine.
- This week in Rust docs 49.
Crate of the 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.
- Want to join the Rust docs team?
- The Underhanded Rust Contest.
- parenchyma: CUDA maintainer. Parenchyma is an extensible HPC-Framework for CUDA, OpenCL and native CPU.
component addshould succeed if target/component is already installed.
- flate2-rs: Add a pure-Rust backend. flate2 provides FLATE, Gzip, and Zlib bindings for Rust.
- tempdir: Add keywords and categories to Cargo.toml.
- tempdir: Add CI for Windows and Mac.
- [easy] rustup: Installation failure via the script has bad error message.
- rustup: Build with panic=abort.
- [easy] rustup: Improve indentation of help.
- [easy] rustup: Document the usage of CARGO_HOME and RUSTUP_HOME to install to a custom location.
- [easy] rustup: Document the use of toolchain link.
- [easy] rustup: "update not yet available" message should not error.
- [easy] bitflags: Move docs to the crate level.
- [easy] bitflags: Add keywords and categories to Cargo.toml.
- [easy] bitflags: Add html_root_url crate attribute.
- [easy] bitflags: Remove mention of stable 'assignment_ops' feature from docs.
- [easy] bitflags: Add an example of what the macro-expanded API looks like.
If you are a Rust project owner and are looking for contributors, please submit tasks here.
Updates from Rust Core
120 pull requests were merged in the last week.
- yet another sort optimization
- even faster
unstable_sort(integrates pdqsort into std, note the "unstable" here is about sort order)
TryFrom(yay for the more general solution)
format!(..)changes padding logic (⚠ breaking change! ⚠)
- fix invalid
Debugdisplay for associated constants
- fix macro derive ICE
- macros: better quoting for
- forbid conflicts between 1.0 and 2.0 macros
used 2.0 macros to shadow global macros
- on-demand privacy checks & associated item retrieval
- warn instead of err on
'staticlifetime bounds (just use it directly, will you?)
- more helpful error on incorrect
- simplify hash table drops
- remove unused adt-def insertion (yay for cleaning up)
- revert an unfortunate interaction between reachability & type inference (never-types make my head hurt, too)
- propagate expected type hints through struct literals
- trait object type parsing refactored, fixed
- HIR now has a
HirIdto use instead of
- MIR: constant function pointers are now values instead of items
- use MIR to translate shims (removes a lot of the old
- rustc now uses the liblog crate from crates.io (The first crate from crates.io in rustc! 🎉)
- split out
rls-datacrate to be used both by
--save-analysisand the RLS (another crate on crates.io)
- Correctly get source for metatdata-only crate type
- add missing LLVM 4.0 debuginfo to globals
- always create unwind tables under Windows
- LLVM on ARM: fix to codegen, fix
- rustdoc now uses natural sort order for item names
- cargo invalidates caches on metadata change
cargo testnow reports the name of failing tests
- cargo no longer overflows the stack on cyclic dependencies
- crates.io now uses Diesel for
- crates.io: Schema simplification
- crates.io: updated dependencies
- crates.io now builds with clippy
- Adam Ransom
- Irfan Hudda
- Sam Whited
Changes to Rust follow the Rust RFC (request for comments) process. These are the RFCs that were approved for implementation this week:
- Add a
compile_error!macro to libstd.
compile_error!will unconditionally cause compilation to fail with the given error message when encountered.
Final Comment Period
- [disposition: postpone] Polymorphic Numeric Constants.
- [disposition: merge] extend
?to operate over other types.
- [disposition: merge] Remove static bound from type_id.
- [disposition: merge] Extend entry API to work on borrowed keys.
- [disposition: merge] Deprecate anonymous parameters.
- Add functions to the language which take a value and an inclusive range, and will "clamp" the input to the range.
- Support profile-specific overrides for cargo features and dependencies.
Style RFCs are part of the process for deciding on style guidelines for the Rust community and defaults for Rustfmt. The process is similar to the RFC process, but we try to reach rough consensus on issues (including a final comment period) before progressing to PRs. Just like the RFC process, all users are welcome to comment and submit RFCs. If you want to help decide what Rust code should look like, come get involved!
Issues in final comment period:
Other significant issues:
Good first issues:
We're happy to mentor these, please reach out to us in #rust-style if you'd like to get invovled
- Mar 29. Neues Rust Meetup in Dresden.
- Mar 29. GNOME+Rust Hackfest 2017, Mexico City.
- Mar 29. South Florida Rust Meetup: Intro to Ownership and Borrowing Part 3.
- Mar 29. Rust Community Team Meeting at #rust-community on irc.mozilla.org.
- Mar 29. Rust Documentation Team Meeting at #rust-docs on irc.mozilla.org.
- Mar 31. Underhanded Rust Contest Submission Deadline.
- Apr 4. Clever Cloud talks Rust in Paris.
- Apr 5. Rust User Group Cologne - Crate Polishing.
- Apr 5. Rust Atlanta Meetup.
- Apr 5. Rust Community Team Meeting at #rust-community on irc.mozilla.org.
- Apr 5. Rust Documentation Team Meeting at #rust-docs on irc.mozilla.org.
- Apr 5. OpenTechSchool Berlin: Rust Hack and Learn.
- Apr 6. Rust DC Learn + Try: tokio.
- Apr 6. Rust Detroit - Letting the type system catch errors for you.
- Apr 6. Rust release triage.
- Apr 10. Seattle Rust Meetup.
- Apr 11. Toronto Rust Meetup.
- Apr 12. Rust Community Team Meeting at #rust-community on irc.mozilla.org.
- Apr 12. Rust Documentation Team Meeting at #rust-docs on irc.mozilla.org.
- Apr 13. Rust Meetup Hamburg - Hack & Learn Tokio Edition.
- Apr 13. Columbus Rust Society.
- Apr 30. RustFest 2017 - Kyiv, Ukraine.
No jobs listed for this week.
Tweet us at @ThisWeekInRust to get your job offers listed here!
Quote of the Week
I had many questions during the example implementations but "where do I find that" was none of them. [...] Thanks, docs team, you are doing great work!
Thanks to Jules Kerssemakers for the suggestion.