pub ThisWeekInRust {} – Telegram
pub ThisWeekInRust {}
989 subscribers
2 photos
2.41K links
Handpicked Rust updates,
delivered to your telegram.

Contacts: @sergeysova
Reposted from: https://this-week-in-rust.org
Source code: https://github.com/sergeysova/this_week_in_rust.rs
Another: @this_week_in_react
Download Telegram
Crate of the week: num-format

This week's crate is num-format, a crate to format numbers to international standards. Thanks to Vikrant for the suggestion!
Updates from core

Add an unstable option to build proc macros for both the host and the target
https://github.com/rust-lang/cargo/pull/6547

Avoid ICE when region sneaks into impl trait
https://github.com/rust-lang/rust/pull/58649

Add const generics to the HIR
https://github.com/rust-lang/rust/pull/58503

Improve parsing diagnostic for negative supertrait bounds
https://github.com/rust-lang/rust/pull/57364

Optimise vec![false; N] to zero-alloc
https://github.com/rust-lang/rust/pull/58628

Add expected/provided byte alignments to validation error message
https://github.com/rust-lang/rust/pull/58658

Remove LazyTokenStream
https://github.com/rust-lang/rust/pull/58476

Add better error message for partial move
https://github.com/rust-lang/rust/pull/58199

Suggest removing parentheses surrounding lifetimes
https://github.com/rust-lang/rust/pull/58198

Use normal mutable borrows in matches
https://github.com/rust-lang/rust/pull/57609

Monomorphize less code in fs::{read, write}
https://github.com/rust-lang/rust/pull/58530

Make overflowing and wrapping negation const
https://github.com/rust-lang/rust/pull/58044

Fix overlapping references in BTree
https://github.com/rust-lang/rust/pull/58431

Relax some Ord bounds on BinaryHeap
https://github.com/rust-lang/rust/pull/58421

Relax some Hash bounds on HashMap and HashSet
https://github.com/rust-lang/rust/pull/58370

Turn duration consts into associated consts
https://github.com/rust-lang/rust/pull/58595

RangeInclusive internal iteration performance improvement
https://github.com/rust-lang/rust/pull/58122

Override VecDeque::try_rfold, also update iterator
https://github.com/rust-lang/rust/pull/58064

Stabilize TryFrom and TryInto with a convert::Infallible empty enum
https://github.com/rust-lang/rust/pull/58302

Stabilize iter::successors and iter::from_fn
https://github.com/rust-lang/rust/pull/58576

Destabilize fixed-width const defined atomic integers
https://github.com/rust-lang/rust/pull/58616

Deprecate the unstable Vec::resize_default
https://github.com/rust-lang/rust/pull/57656

Modify doctest's auto-fn main() to allow Results
https://github.com/rust-lang/rust/pull/56470

crates.io: Stop logging the referer header
https://github.com/rust-lang/crates.io/pull/1636
Crate of the week: shellfn

This week's crate is shellfn, a proc macro to easily and safely use shell noscripts in Rust. Thanks to Willi Kappler for the suggestion!
Updates from core

Support defining C compatible variadic functions
https://github.com/rust-lang/rust/pull/57760

Fix C-variadic function printing
https://github.com/rust-lang/rust/pull/58865

Add support for using a jobserver with Rayon
https://github.com/rust-lang/rust/pull/56946

Stabilize unrestricted_attribute_tokens
https://github.com/rust-lang/rust/pull/57367

Include bounds from promoted constants in NLL
https://github.com/rust-lang/rust/pull/57202

NLL: Type check operations with pointer types
https://github.com/rust-lang/rust/pull/58673

NLL: Remove LiveVar
https://github.com/rust-lang/rust/pull/58505

Self-Profiler: Make the profiler faster/more efficient
https://github.com/rust-lang/rust/pull/58425

Normalize the type Self resolves to in an impl
https://github.com/rust-lang/rust/pull/58757

Use internal iteration in all methods of Filter and FilterMap
https://github.com/rust-lang/rust/pull/58730
Crate of the week: multi_try

This week's crate is multi_try, a crate to simplify working with multiple results. Thanks to Azriel Hoh for the suggestion!
Updates from core

Make the rustc driver and interface demand driven
rust-lang/rust/pull/56732

Make the lifetime parameters of tcx consistent
rust-lang/rust/pull/58926

Don't promote function calls to nonpromotable things
rust-lang/rust/pull/58784

HirIdification: almost there
rust-lang/rust/pull/58915

Monomorphize generator field types for debuginfo
rust-lang/rust/pull/58906

Always emit unclosed delimiter diagnostics
rust-lang/rust/pull/58903

Mention unwind(aborts) in diagnostics for #[unwind]
rust-lang/rust/pull/58762

Add const generics to ty (and transitive dependencies)
rust-lang/rust/pull/58583

Make the Entry API of HashMap Sync and Send
rust-lang/rust/pull/58369

On return type impl Trait for block with no expr point at last semi
rust-lang/rust/pull/58204

Create a derive macro for HashStable and allow proc macros in rustc
rust-lang/rust/pull/58013

Move index updates off the web server
rust-lang/crates.io/pull/1588

Make Unique::as_ptr, NonNull::dangling and NonNull::cast const
rust-lang/rust/pull/58750

MaybeUninit: add read_initialized, add examples
rust-lang/rust/pull/58660

Add as_slice() to slice::IterMut and vec::Drain
rust-lang/rust/pull/58924

cargo: Emit warning on misspelled environment variables
rust-lang/cargo/pull/6694

rustdoc: add option to calculate "documentation coverage"
rust-lang/rust/pull/58626
News

New members for the Rust core team.
internals.rust-lang.org

Tools team changes.
internals.rust-lang.org

Raspberry Pi 3: Hardware debugging using JTAG.
rust-embedded/rust-raspi3-OS-tutorials/tree/master/0B_hw_debug_JTAG

From 46s to 5s - Optimizing a 350 line raytracer in Rust.
blog.usejournal.com

Should Rust channels panic on send if nobody's listening?
www.randomhacks.net

In nightly Rust, 'await!' may never return (dropping futures).
www.randomhacks.net

The rise of wgpu.
gfx-rs.github.io

Making a case: Rust for Python developers.
medium.com/@rajasekar3eg

Intro to web programming in Rust for NodeJS developers.
medium.com/@gruberbastian

Remote development and debugging of Rust with CLion.
medium.com/nearprotocol

This week in Rust and WebAssembly 13.
rustwasm.github.io

The Embedded WG newsletter 16.
rust-embedded.github.io
Crate of the week: validator

This week's crate is validator, a crate offering simple validation for Rust structs. Thanks to Willi Kappler for the suggestion!
Do you want to read core updates here?
Anonymous Poll
78%
Yes
16%
Don't care
7%
No, hide it
Updates from core

Optimize copying large ranges of undefmask blocks
rust-lang/rust/pull/58556

Unregress using scalar unions in constants
rust-lang/rust/pull/59139

Ignore higher-ranked object bound conditions created by WF
rust-lang/rust/pull/59132

Visit impl Trait for dead_code lint
rust-lang/rust/pull/59129

rustc: Fix ICE when trait alias has bare Self
rust-lang/rust/pull/59118

Fix ICE in MIR pretty printing
rust-lang/rust/pull/59036

resolve: Account for new importable entities
rust-lang/rust/pull/59047

Remove restriction on isize/usize in repr(simd)
rust-lang/rust/pull/59201

Add Cmp::clamp for ranges
rust-lang/rust/pull/58710

Stabilize Range*::contains
rust-lang/rust/pull/59152

Change std::fs::copy to use copyfile on MacOS and iOS
rust-lang/rust/pull/58901

Stabilize Option::copied
rust-lang/rust/pull/59231

cargo: Fix resolving yanked crates when using a local registry
rust-lang/cargo/pull/6742

cargo: Stricter package change detection
rust-lang/cargo/pull/6740
News

Writing an OS in Rust: Paging implementation.
os.phil-opp.com

Fast, bump-allocated virtual DOMs with Rust and Wasm.
hacks.mozilla.org

Implementing a NES emulator in Rust.
www.michaelburge.us

Porting the UNIX-like Redox OS to Arm v8.0.
fosdem.org

A Rust API for librnoscript.
people.gnome.org

Embedded in Rust: Implementing a static stack usage analysis tool.
blog.japaric.io

Scientific computing: a Rust adventure (part 1 - zero-cost abstractions).
www.lpalmieri.com

Web Programming in Rust - 02/x: Deployments.
dev.to

Announcing Governance Working Group.
internals.rust-lang.org
Crate of the week: copyless

This week's crate is copyless, a crate to extend boxes and vecs to operate on values while avoiding memcpys. Thanks to Dzmitry Malyshau for the suggestion!
Updates from core

Move libtest out of rust-lang/rust
rust-lang/rust/pull/57842

Introduce assembly tests suite
rust-lang/rust/pull/58791

syntax: Better recovery for $ty::AssocItem and ty!()::AssocItem
rust-lang/rust/pull/59058

MIR optimization: Run branch cleanup after copy propagation
rust-lang/rust/pull/59290

Do not complain about non-existing fields after parse recovery
rust-lang/rust/pull/59266

Make meta-item API compatible with LocalInternedString::get soundness fix
rust-lang/rust/pull/59256

Use a valid name for graphviz graphs
rust-lang/rust/pull/59251

When moving out of a for loop head, suggest borrowing it
rust-lang/rust/pull/59195

When encountering ||{}(), suggest the likely intended (||{})()
rust-lang/rust/pull/59035

Point at coercion reason for if expressions without else clause if caused by return type
rust-lang/rust/pull/58981

Elide object safety errors on non-existent trait function
rust-lang/rust/pull/58929

Unify OsString/OsStr for byte-based implementations
rust-lang/rust/pull/58953

Add provided methods Seek::{stream_len, stream_position}
rust-lang/rust/pull/58422

Add todo!() macro
rust-lang/rust/pull/56348

Implement ExactSizeIterator for ToLowercase and ToUppercase
rust-lang/rust/pull/58778

Make Option<ThreadId> no larger than ThreadId with NonZeroU64
rust-lang/rust/pull/59291

Stabilize refcell_map_split feature
rust-lang/rust/pull/59280

Add const generics to rustdoc
rust-lang/rust/pull/59170

crates.io: Allow download counts to fail to be updated
rust-lang/crates.io/pull/1675
News

Why Hashbrown (Rust's new HashMap implementation) does a double-lookup on insertion.
gankro.github.io

Chaining functions without returning self.
randompoison.github.io

"Learning Rust With Entirely Too Many Linked Lists" has been updated for Rust 2018.
rust-unofficial.github.io

Miri available as rustup component.
www.ralfj.de

How to debug Rust with Visual Studio Code.
www.forrestthewoods.com

Rust: The hard parts - part one: References, borrowing, and ownership.
naftuli.wtf

Procedural macro in Rust 101.
dev.to

Generalizing seqlocks: The swym algorithm.
mtak-blog.github.io

The phantom builder.
wiredforge.com

Variance in Rust: An intuitive explanation.
ehsanmkermani.com

Rust All Hands 2019: Array iterators, Rayon, and more.
developers.redhat.com

This week in Rust and WebAssembly 14.
rustwasm.github.io

The Embedded WG newsletter 17.
rust-embedded.github.io