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: generational-arena

This week's crate is generational-arena, a safe arena allocator that allows deletion without suffering from the ABA problem by using generational indices. Thanks to Willi Kappler for the suggestion!
Updates from core

enable ThinLTO with incremental compilation
https://github.com/rust-lang/rust/pull/53673

build LLVM with ThinLTO enabled (2nd attempt)
https://github.com/rust-lang/rust/pull/53245

update LLVM submodule (mainly WASM improvements)
https://github.com/rust-lang/rust/pull/53611

ADD more Cortex-R targets
https://github.com/rust-lang/rust/pull/53679

change the default linker of the ARM Cortex-M targets to rust-lld
https://github.com/rust-lang/rust/pull/53648

begin preparation for Rust 2018
https://github.com/rust-lang/crates.io/pull/1467

fix promotion stability hole in old borrowck
https://github.com/rust-lang/rust/pull/53699

Miri engine cleanup
https://github.com/rust-lang/rust/pull/53671

Miri refactor: Final round
https://github.com/rust-lang/rust/pull/53779

use partial but correct vtable layout
https://github.com/rust-lang/rust/pull/53757

replace AccumulateVec by SmallVec
https://github.com/rust-lang/rust/pull/53659

HybridIdxSet tweaks
https://github.com/rust-lang/rust/pull/53656

NLL: experiment with inverting liveness
https://github.com/rust-lang/rust/pull/53314

fix NLL ICEs
https://github.com/rust-lang/rust/pull/53580

set rustfix auto-applicability for a few lints
https://github.com/rust-lang/rust/pull/53655

use FxHash{Map, Set} instead of the default Hash{Map, Set}
https://github.com/rust-lang/rust/pull/53472

various small diagnostic and code clean up
https://github.com/rust-lang/rust/pull/53842

save-analysis: record info for the types in where clauses
https://github.com/rust-lang/rust/pull/53838

fix u32 steps_between for 16-bit systems
https://github.com/rust-lang/rust/pull/53755

reduce number of syscalls in rand
https://github.com/rust-lang/rust/pull/53725

reoptimize VecDeque::append
https://github.com/rust-lang/rust/pull/53564

add more const int ops
https://github.com/rust-lang/rust/pull/53697

make std::intrinsics::transmute() const fn
https://github.com/rust-lang/rust/pull/53535

impl PartialEq for TryFromIntError
https://github.com/rust-lang/rust/pull/53476

add --allow-staged to cargo fix
https://github.com/rust-lang/cargo/pull/5943

add rust-gdbgui noscript
https://github.com/rust-lang/rust/pull/53774

set cfg(rustdoc) when rustdoc is running on a crate
https://github.com/rust-lang/rust/pull/53076

rustbuild: distribute libLLVM.so with rustc
https://github.com/rust-lang/rust/pull/53828
Crate of the week: cgroups

This week's crate is cgroups, a native Rust library for managing control groups under Linux. Thanks to yoshuawuyts for the suggestion!
Updates from core

introduce Custom Test Frameworks
https://github.com/rust-lang/rust/pull/53410

ThinLTO: don't keep files open after mmaping them
https://github.com/rust-lang/rust/pull/53962

rustc: prepare the atomics feature for wasm
https://github.com/rust-lang/rust/pull/53878

if- and while-let-chains, take 2 - edition changes
https://github.com/rust-lang/rust/pull/53854

resolve: relax shadowing restrictions on macro-expanded macros
https://github.com/rust-lang/rust/pull/53778

proc_macro::Group::span_open and span_close
https://github.com/rust-lang/rust/pull/53902

fix incorrect outer function type parameter message
https://github.com/rust-lang/rust/pull/53960

fix is_non_exhaustive confusion between structs and enums
https://github.com/rust-lang/rust/pull/53721

rewrite precompute_borrows_out_of_scope for fewer hash table lookups
https://github.com/rust-lang/rust/pull/53942

make loop detector only consider reachable memory
https://github.com/rust-lang/rust/pull/52626

miri engine: make sure we do not copy unsized data
https://github.com/rust-lang/rust/pull/53883

optimize miri checking of integer array/slices
https://github.com/rust-lang/rust/pull/53903

NLL: do not propagate closure requirements if we can prove them locally
https://github.com/rust-lang/rust/pull/53745

NLL: teach SCC about 'static
https://github.com/rust-lang/rust/pull/53327

implement Unpin for Box, Rc, and Arc
https://github.com/rust-lang/rust/pull/53874

add trim_start, trim_end etc.; deprecate trim_left, trim_right, etc. in future
https://github.com/rust-lang/rust/pull/52994

allow to check if sync::Once is already initialized
https://github.com/rust-lang/rust/pull/53027

stabilize #[panic_handler]
https://github.com/rust-lang/rust/pull/51366

rustdoc: show trait impl docs
https://github.com/rust-lang/rust/pull/51885

rustbuild: tweak LLVM distribution layout
https://github.com/rust-lang/rust/pull/53955
News

ripgrep 0.10.0 released (PCRE2 and multi-line support).
https://github.com/BurntSushi/ripgrep/releases/tag/0.10.0

rustfmt, compiled to wasm, in a webpage.
https://alexcrichton.github.io/rustfmt-wasm/

Rust faster – SIMD edition.
https://llogiq.github.io/2018/09/06/fast.html

2019 Strategy for rustc and the RLS.
https://internals.rust-lang.org/t/2019-strategy-for-rustc-and-the-rls/8361

Adventures in Rust: Futures and Tokio.
http://bryangilbert.com/post/code/rust/adventures-futures-tokio-rust/

From Rust to beyond, episode 4: The C galaxy. An end-to-end example, includes cbindgen and clang.
https://mnt.io/2018/09/11/from-rust-to-beyond-the-c-galaxy/

Parallelizing PNG, part 5: choosing Rust for mtpng.
https://brionv.com/log/2018/09/09/parallelizing-png-part-5-choosing-rust-for-mtpng/

Tower Web - Expanding the middleware stack.
https://medium.com/@carllerche/tower-web-expanding-the-middleware-stack-f9bf55bfa109

Beware the rust cache on Travis (or why you should use it with care).
https://levans.fr/rust_travis_cache.html

RustFest Rome CFP is open and supporter tickets available.
https://blog.rustfest.eu/this-week-in-rustfest-0-cfp-and-tickets

Videos from RustConf 2018.
https://www.youtube.com/playlist?list=PL85XCvVPmGQi3tivxDDF1hrT9qr5hdMBZ

Rust Embedded WG newsletter 11.
https://rust-embedded.github.io/blog/2018-09-09-newsletter-11/
Crate of the week: cargo-src

This week's crate is cargo-src, a Rust source browser with syntax highlighting, jump to def, smart search and much more. Thanks to mark-i-m for the suggestion!
Framework-agnostic routing library: rouste
Updates from core

temporarily prohibit proc macro attributes placed after derives
https://github.com/rust-lang/rust/pull/54277

add target thumbv7a-pc-windows-msvc
https://github.com/rust-lang/rust/pull/53621

PowerPC: fix the calling convention for i1 arguments on PPC32
https://github.com/rust-lang/llvm/pull/127

allow for opting out of ThinLTO and clean up LTO related cli flag handling
https://github.com/rust-lang/rust/pull/53950

resolve: allow only core, std, meta and --extern in Rust 2018 paths
https://github.com/rust-lang/rust/pull/54116

resolve: do not error on access to proc macros imported with #[macro_use]
https://github.com/rust-lang/rust/pull/53461

add inspection and setter methods to proc_macro::Diagnostic
https://github.com/rust-lang/rust/pull/52896

support anoscription for patterns in NLL
https://github.com/rust-lang/rust/pull/53873

allow named lifetimes in async functions
https://github.com/rust-lang/rust/pull/54000

suggest && and || instead of 'and' and 'or'
https://github.com/rust-lang/rust/pull/54181

use structured suggestion for "missing mut" label
https://github.com/rust-lang/rust/pull/54157

de-overlap the lifetimes of flow_inits and flow_{un,ever_}inits
https://github.com/rust-lang/rust/pull/54213

don't compute padding of braces unless they are unmatched
https://github.com/rust-lang/rust/pull/54092

don't suggest extra clone when converting cloned slice to Vec
https://github.com/rust-lang/rust/pull/54080

reexport CheckLintNameResult
https://github.com/rust-lang/rust/pull/54106

miri: keep around some information for dead allocations
https://github.com/rust-lang/rust/pull/54254

miri loop detector hashing
https://github.com/rust-lang/rust/pull/54076

fix some uses of pointer intrinsics with invalid pointers
https://github.com/rust-lang/rust/pull/53804

first step towards u128 instead of Const in PatternKind::Range
https://github.com/rust-lang/rust/pull/51159

stabilize outlives requirements
https://github.com/rust-lang/rust/pull/53793

stabilize #[used]
https://github.com/rust-lang/rust/pull/51363

stabilize slice_align_to
https://github.com/rust-lang/rust/pull/53754

implement tuple_struct_self_ctor (RFC #2302)
https://github.com/rust-lang/rust/pull/53751

implement map_or_else for Result<T, E>
https://github.com/rust-lang/rust/pull/53777

add a implementation of From for converting &'a Option<T> into Option<&'a T>
https://github.com/rust-lang/rust/pull/53218

cargo: add empty ctrlc handler on Windows
https://github.com/rust-lang/cargo/pull/6004
News

🎈🎉 Announcing Rust 1.29. 🎉🎈
https://blog.rust-lang.org/2018/09/13/Rust-1.29.html

Ripgrep is available as a package in Ubuntu 18.10.
https://github.com/BurntSushi/ripgrep/pull/1054

WebRender is now enabled by default in Firefox Nightly on Windows 10 with Nvidia GPUs.
https://groups.google.com/forum/#!topic/mozilla.dev.platform/x_sFbDgQJP0

RustConf 2018 closing keynote (blog post).
https://kyren.github.io/2018/09/14/rustconf-talk.html

Rising Tide: building a modular web framework in the open.
https://rust-lang-nursery.github.io/wg-net/2018/09/11/tide.html

You can’t “turn off the borrow checker” in Rust.
https://words.steveklabnik.com/you-can-t-turn-off-the-borrow-checker-in-rust

Measuring SmallVec footprint with Smallvectune.
https://llogiq.github.io/2018/09/13/smallvec.html

How we organize a complex Rust codebase.
https://blog.getseq.net/rust-at-datalust-how-we-organize-a-complex-rust-codebase/

Desktop apps with Rust (Electorn + WebAssembly).
https://speice.io/2018/09/isomorphic-apps.html

Postgres over TLS with the postgres crate, r2d2_postgres and openssl.
https://matthewkmayer.github.io/blag/public/post/postgres-tls/

The Networking WG newsletter 1.
https://internals.rust-lang.org/t/the-networking-working-group-newsletter-01/8391
Crate of the week: mtpng

This week's crate is mtpng, a parallelized PNG encoder. Thanks to Willi Kappler for the suggestion!
Updates from core

switch linker for aarch64-pc-windows-msvc from LLD to MSVC
https://github.com/rust-lang/rust/pull/54290

remove (more) CAS API from Atomic* types where not natively supported
https://github.com/rust-lang/rust/pull/54280

parser: tweak function parameter parsing to avoid rollback on succesfull path
https://github.com/rust-lang/rust/pull/54415

improve handling of type bounds in bit_set.rs
https://github.com/rust-lang/rust/pull/54370

use HybridBitSet in SparseBitMatrix
https://github.com/rust-lang/rust/pull/54318

merge bitvec.rs and indexed_set.rs
https://github.com/rust-lang/rust/pull/54286

split Liveness::users into three
https://github.com/rust-lang/rust/pull/54211

compress Liveness data some more
https://github.com/rust-lang/rust/pull/54420

NLL: deduplicate errors for incorrect move in loop
https://github.com/rust-lang/rust/pull/53995

NLL: rework checking for borrows conflicting with drops
https://github.com/rust-lang/rust/pull/54509

report when borrow could cause &mut aliasing during Drop
https://github.com/rust-lang/rust/pull/54310

move std::os::raw::c_void into libcore and re-export in libstd and
Re-export core::ffi::c_void if it exists (RFC #2521)
https://github.com/rust-lang/rust/pull/53910

make rustc::middle::region::Scope's fields public
https://github.com/rust-lang/rust/pull/54260

miri: correctly compute expected alignment for field
https://github.com/rust-lang/rust/pull/54298

extend MIR inlining to all operand variants
https://github.com/rust-lang/rust/pull/54416

std: check for overflow in str::repeat
https://github.com/rust-lang/rust/pull/54399

switch wasm math symbols to their original names
https://github.com/rust-lang/rust/pull/54257

update to a new pinning API
https://github.com/rust-lang/rust/pull/53877

implement [T]::copy_within
https://github.com/rust-lang/rust/pull/53652

implement MaybeUninit
https://github.com/rust-lang/rust/pull/53508

Duration div mul extras
https://github.com/rust-lang/rust/pull/52813

cargo: fix missing messages when --message-format=json is deeply nested
https://github.com/rust-lang/cargo/pull/6081

cargo: fix incomplete conflict set backjump
https://github.com/rust-lang/cargo/pull/5988
Crate of the week: packed_simd

This week's crate is packed_simd, a crate with portable SIMD vector types. Thanks to Gabriel Majeri for the suggestion!
Updates from core

Stabilize pattern_parentheses feature.
https://github.com/rust-lang/rust/pull/54497

Support an explicit annotation for marker traits.
https://github.com/rust-lang/rust/pull/53693

Better user experience when attempting to call associated functions with dot notation.
https://github.com/rust-lang/rust/pull/54308

Add &quot;temporary value borrowed for too long&quot; error.
https://github.com/rust-lang/rust/pull/54164

Remove -Z disable_ast_check_for_mutation_in_guard.
https://github.com/rust-lang/rust/pull/54676

Add a -C default-linker-libraries option.
https://github.com/rust-lang/rust/pull/54675

Implement the dbg!(..) macro.
https://github.com/rust-lang/rust/pull/54317

Add -Z emit-stack-sizes.
https://github.com/rust-lang/rust/pull/51946

impl trait in bindings (feature: impl-trait-existential-types.
https://github.com/rust-lang/rust/pull/53542

Make &quot;await&quot; a pseudo-edition keyword.
https://github.com/rust-lang/rust/pull/54411

Use full name to identify a macro in a FileName.
https://github.com/rust-lang/rust/pull/54338

Introduce the partition_dedup/by/by_key methods for slices.
https://github.com/rust-lang/rust/pull/54058

Rework how we handle outlives relationships.
https://github.com/rust-lang/rust/pull/54453

NLL: Get Polonius borrow check to work in simple cases.
https://github.com/rust-lang/rust/pull/54468

NLL: Be more permissive when checking access due to Match.
https://github.com/rust-lang/rust/pull/53438

NLL: Rework checking for borrows conflicting with drops.
https://github.com/rust-lang/rust/pull/54509

Don't lint non-extern-prelude extern crate's in Rust 2018.
https://github.com/rust-lang/rust/pull/54650

Deny the overflowing_literals lint for the 2018 edition.
https://github.com/rust-lang/rust/pull/54507

Rename slice::exact_chunks() to slice::chunks_exact().
https://github.com/rust-lang/rust/pull/54537

Avoid loading constructor attributes in AdtDef decoding.
https://github.com/rust-lang/rust/pull/54485

Panic when using mem::uninitialized or mem::zeroed on an uninhabited type.
https://github.com/rust-lang/rust/pull/54667

Improvements to finding LLVM's FileCheck.
https://github.com/rust-lang/rust/pull/54558

In which we include attributes in unused extern crate suggestion spans.
https://github.com/rust-lang/rust/pull/54488

In which inferable outlives-requirements are linted.
https://github.com/rust-lang/rust/pull/53013

Add a per-tree error cache to the obligation forest.
https://github.com/rust-lang/rust/pull/53255