https://this-week-in-rust.org/blog/2023/06/14/this-week-in-rust-499/ This Week in Rust 14 JUN 2023 This Week in Rust 499 Hello and welcome to another issue of This Week in Rust! Rust is a programming language empowering everyone to build reliable and efficient software. This is a weekly summary of its progress and community. Want something mentioned? Tag us at @ThisWeekInRust on Twitter or @ThisWeekinRust on mastodon.social, or send us a pull request. Want to get involved? We love contributions. This Week in Rust is openly developed on GitHub and archives can be viewed at this-week-in-rust.org. If you find any errors in this week's issue, please submit a PR. Updates from Rust Community Foundation * 2023 Rust Foundation Fellowship Application Open Through June 30 Project/Tooling Updates * Fyrox Game Engine 0.30 * Announcing Nickel 1.0 * rust-analyzer changelog #185 * Announcing Zebra 1.0.0: a Rust implementation of Zcash Observations/Thoughts * Iterating on Testing in Rust * Higher-ranked projections (send bound problem, part 4) * [video] Raph Levien on Xilem Vector Graphics * [video] Unsafe Rust and Miri by Ralf Jung * [audio] Slint 1.0 with Tobias Hunger Rust Walkthroughs * A Beginner's Guide to Rust Procedural Macros: Creating a JSON Derive Macro * Implementing data parallelism with Rayon Rust * Write a Redux library in Rust * Check AI-Generated Code Perfectly and Automatically: My Experience Applying Kani's Formal Verification to ChatGPT-Suggested Rust Code * Observing your Rust application with Quickwit, Jaeger and Grafana * [video] Introducing the enum data type in Rust * [video] Rust streams: Diving into WebAssembly and WASI (series) Crate of the Week This week's crate is mailtutan, a simulating SMTP server. Thanks to Mohsen Alizadeh for the self-suggestion! Please submit your suggestions and votes for next week! Call for Participation Always wanted to contribute to open-source projects but did not 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. * Send File - help improve the readme * Send File - create wifi hotspot on Linux operating system * Send File - use Tauri store plugin to persist app data * Ockam - Extract command logic from Kafka create commands * Ockam - Enable pnpm support in dependabot * Ockam - Update CLI documentation for credential commands * Hyperswitch - add domain type for client secret * Hyperswitch - Remove Basic keyword from shift4 API key * Hyperswitch - Payments list doesn't work with pagination parameters If you are a Rust project owner and are looking for contributors, please submit tasks here. Updates from the Rust Project 346 pull requests were merged in the last week * expand: prevent infinite loop in macro containing only "///" * expand: change how #![cfg(FALSE)] behaves on crate root * add task::Waker::noop * add windows_sys type definitions for ARM32 manually * add deprecation warning to python versions <3.6 in x.py * add help for trying to do C-like pointer arithmetics * add new Tier-3 targets: loongarch64-unknown-none* * added custom risc32-imac for esp-espidf target * adjust span labels for hidden_glob_reexports * avoid ICE on #![doc(test(...)] with literal parameter * avoid passing --cpu-features when empty * avoid unwind across extern "C" in thread_local::fast_local * diagnostics: do not suggest type name tweaks on type-inferred closure args * do fix_*_builtin_expr hacks on the writeback results * don't hold the active queries lock while calling make_query * don't mention already-set fields in struct constructor missing field error * don't suggest changing &self and &mut self in function signature to be mutable when taking &mut self in closure * dont compute opt_suggest_box_span span for TAIT * emit an error when return-type-notation is used with type/const params * ensure space is inserted after keyword in unused_delims * fall back to bidirectional normalizes-to if no subst-relate candidate in alias-relate goal * fix ICE for while loop with assignment condition with LHS place expr * fix suggestion for matching struct with .. on both ends * force all native libraries to be statically linked when linking a static binary * implement stdout streaming in render_tests::Renderer * improved std support for ps vita target * increase the accuracy of effective visibilities calculation * make "consider importing" consistent for macros * make GDB Python Pretty Printers loadable after spawning GDB, avoiding required rust-gdb * merge method, type and const object safety checks * normalize in infcx instead of globally for Option::as_deref suggestion * prevent emitting missing_docs for pub extern crate * private-in-public lints implementation * remember names of cfg-ed out items to mention them in diagnostics * remove default visitor impl in region constraint generation * removed use of iteration through a HashMap/HashSet in rustc_incremental and replaced with IndexMap/IndexSet * resolve vars in result from scrape_region_constraints * respect RUST_BACKTRACE for delayed bugs * structurally resolve pointee in check_pat_lit * suggest using ptr::null_mut when user provided ptr::null to a function expecting ptr::null_mut * take MIR dataflow analyses by mutable reference * uplift clippy::cmp_nan lint * uplift clippy::undropped_manually_drops lint * use load+store instead of memcpy for small integer arrays * write to stdout if - is given as output file * use 128 bits for TypeId hash * support float-like tuple indices in offset_of!() * codegen_gcc: regen intrinsics with latest LLVM version * cargo: initial support for single-file packages * cargo: disable multiplexing for some versions of curl * cargo: fetch nested git submodules * cargo: test: loose overly matches for git cli output * cargo: upgrade to gix v0.45 for multi-round pack negotiations * rustdoc: Fix infinite loop when retrieving impls for type alias * rustdoc: List matching impls on type aliases * rustdoc: search for slices and arrays by type with [] * rustfmt: recover comments between attrs and generic param * rustfmt: remove rustc-workspace-hack * clippy: new lints: excessive_nesting, needless_if, unnecessary_literal_unwrap, redundant type annotations, arc_with_non_send_or_sync, min_ident_chars, large_stack_frames * clippy: let_with_type_underscore: Don't emit on locals from procedural macros * clippy: missing_fields_in_debug: don't ICE when self type is a generic param * clippy: redundant_closure: special case inclusive ranges * clippy: suspicious_else_formatting: Don't warn if there is a comment between else and curly bracket * clippy: type_repetition_in_bounds: Don't lint on derived code * clippy: unnecessary_to_owned: check that the adjusted type matches target * clippy: useless_vec: lint vec! invocations when a slice or an array would do * clippy: useless_vec: lint on vec![_] invocations that adjust to a slice * clippy: allow disabling module inception on private modules * clippy: consider autoderef through user-defined Deref in eager_or_lazy * clippy: don't lint as_conversions in proc macros * clippy: extend explicit_iter_loop and explicit_into_iter_loop * clippy: fix diverging_sub_expression not checking body of block * clippy: fix useless_vec suggestion in for _ in vec![..] * clippy: handle exponent without digits in numeric_literal * clippy: ignore more pointer types in unnecessary_cast * clippy: ignore more type aliases in unnecessary_cast * clippy: make cast_possible_wrap work correctly for 16 bit {u,i} size * fix rust-analyzer proc macro server * rust-analyzer: add span to group * rust-analyzer: count query entries in memory usage command * rust-analyzer: inline const as literal * rust-analyzer: fix panic in displaying const trait objects * rust-analyzer: fix panic in displaying unsized structs * rust-analyzer: deduplicate fields and types in completion * rust-analyzer: derive source scope from syntax node to be transformed * rust-analyzer: exclude Markdown injection grammar from .vscodeignore * rust-analyzer: fix ci never running on nightly when proc-macro things change * rust-analyzer: fix panic in format_args expansion * rust-analyzer: fix proc-macro slow test * rust-analyzer: implemeted lifetime transformation fot assists * rust-analyzer: infer return type for async function in generate_function * rust-analyzer: lower const params with a bad id * rust-analyzer: only generate trait bound for associated types in field types Rust Compiler Performance Triage Our build pipeline got sped up by PR #112012, which side-steps one of the rustc rebuilds we were suffering with before. (There is further potential speed-up by caching LLVM, as noted by on that PR.) Other than that, various small regressions that are largely noise, as well as one unexpected increase in binary sizes from PR #109005 that we should follow up on. Triage done by @pnkfelix. Revision range: adc719d7..4bd4e2ea 7 Regressions, 3 Improvements, 5 Mixed; 5 of them in rollups 46 artifact comparisons made in total Full report here Approved RFCs Changes to Rust follow the Rust RFC (request for comments) process. These are the RFCs that were approved for implementation this week: * Return position impl Trait in traits 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. RFCs * No RFCs entered Final Comment Period this week. Tracking Issues & PRs * [disposition: merge] Implement Sync for mpsc::Sender * [disposition: merge] resolve: Remove artificial import ambiguity errors * [disposition: merge] Relax implicit T: Sized bounds on BufReader , BufWriter and LineWriter New and Updated RFCs * [new] Infered types Call for Testing An important step for RFC implementation is for people to experiment with the implementation and give feedback, especially before stabilization. The following RFCs would benefit from user testing before moving forward: * No RFCs issued a call for testing this week. If you are a feature implementer and would like your RFC to appear on the above list, add the new call-for-testing label to your RFC along with a comment providing testing instructions and/or guidance on which aspect(s) of the feature need testing. Upcoming Events Rusty Events between 2023-06-14 - 2023-07-12 Virtual * 2023-06-14 | Virtual (Cardiff, UK) | Rust and C++ Cardiff + Building Spin Locks and Channels - Rust Atomics & Locks Bookclub Chapters 4 & 5 * 2023-06-14 | Virtual (Boulder, CO, US) | Boulder Elixir and Rust + Monthly Meetup * 2023-06-15 | Virtual (Stuttgart, DE) | Rust Community Stuttgart + Rust-Meetup * 2023-06-15 | Virtual (Tehran, IR) | Iran Rust Meetup + Iran Rust Meetup #11 - Unsafe and FFI * 2023-06-19 | Virtual (San Francisco, CA, US) | Data Science on AWS - San Francisco, Global + Generative AI Parameter Efficient Fine Tuning (PEFT), RLHF + Polars: "Polars, lightning-fast DataFrame library for Rust and Python", presented by Suman Debnath * 2023-06-20 | Virtual (Berlin, DE) | Berline.rs / OpenTechSchool Berlin + Rust Hack and Learn * 2023-06-20 | Virtual (Washington, DC, US) | Rust DC + Mid-month Rustful * 2023-06-21 | Virtual (Vancouver, BC, CA) | Vancouver Rust + Rust Study/Hack/Hang-out * 2023-06-22 | Virtual (Karlsruhe, DE) | Karlsruhe Functional Programmers Group + Stammtisch (gemeinsam mit der C++ UG KA) * 2023-06-25 | Virtual (Auckland, NZ) | ResBaz Aotearoa 2023 + Research Computing With The Rust Programming Language - Tim McNamara * 2023-06-27 | Virtual (Dallas, TX, US) | Dallas Rust + Last Tuesday * 2023-06-28 | Virtual (Chicago, IL, US) | Chicago Healthcare Cloud Technology Community + Rust for Mission-Critical AI: A Journey into Healthcare's Safest Language * 2023-06-29 | Virtual (Ciudad de Mexico, MX) | Rust MX + Rust y Haskell * 2023-07-01 | Virtual (Nurnberg, DE) | Rust Nuremberg + Deep Dive Session 4: Protohackers Exercises Mob Coding (Problem II onwards) * 2023-07-04 | Virtual (Berlin, DE) | Berline.rs / OpenTechSchool Berlin + Rust Hack and Learn * 2023-07-04 | Virtual (Buffalo, NY, US) | Buffalo Rust Meetup + Buffalo Rust User Group, First Tuesdays * 2023-07-05 | Virtual (Indianapolis, IN, US) | Indy Rust + Indy.rs - with Social Distancing * 2023-07-11 | Virtual (Dallas, TX, US) | Dallas Rust + Second Tuesday Asia * 2023-06-15 | Seoul, KR | T-RUST meetup + T-RUST Meetup Europe * 2023-06-16 | Stuttgart, DE | Rust Community Stuttgart + OnSite Meeting * 2023-06-20 | Montpellier, FR | Montpellier Rust Meetup + Meetup Rust Juin 2023 * 2023-06-22 | Vienna, AT | Papers We Love Vienna + June: Data and Ownership in Rust * 2023-06-22 | Bern, CH | Rust Bern + Second Rust Bern Meetup * 2023-06-22 | Wroclaw, PL | Rust Wroclaw + Rust Meetup #34 * 2023-06-27 | London, UK | Rust London User Group + LDN Talks June 2023 Shuttle Takeover * 2023-06-27 | Paris, FR | Rust Paris + Rust Paris meetup #60 * 2023-06-28 | Bratislava, SK | Bratislava Rust Meetup Group + Rust Meetup by Sonalake * 2023-06-29 | Augsburg, DE | Rust Meetup Augsburg + Augsburg Rust Meetup * 2023-06-29 | Copenhagen, DK | Copenhagen Rust Community + Rust metup #37 at Samsung! * 2023-07-01 | Basel, CH | Rust Basel + (Beginner) Rust Workshop * 2023-07-03 | Zurich, CH | Rust Zurich + Rust in the Linux Kernel - July Meetup North America * 2023-06-15 | Mountain View, CA, US | Mountain View Rust Meetup + Rust Meetup at Hacker Dojo * 2023-06-17 | San Jose, CA, US | Rust Breakfast & Learn + Rust: breakfast & learn * 2023-06-20 | San Francisco, CA, US | San Francisco Rust Study Group + Rust Hacking in Person * 2023-06-21 | Austin, TX, US | Rust ATX + Rust Lunch - Pizza sponsored by JFrog * 2023-06-21 | Somerville, MA, US | Boston Rust Meetup + Ball Square Rust Lunch, June 21 * 2023-06-22 | New York, NY, US | Rust NYC + Learn How to Use cargo-semver-checks and Closure Traits to Write Better Code * 2023-06-24 | San Jose, CA, US | Rust Breakfast & Learn + Rust: breakfast & learn * 2023-06-28 | Cambridge, MA, US | Boston Rust Meetup + Harvard Square Rust Lunch * 2023-07-01 | San Jose, CA, US | Rust Breakfast & Learn + Rust: breakfast & learn * 2023-07-07 | Chicago, IL, US | Deep Dish Rust + Rust Lunch If you are running a Rust event please add it to the calendar to get it mentioned here. Please remember to add a link to the event too. Email the Rust Community Team for access. Jobs Please see the latest Who's Hiring thread on r/rust Quote of the Week Alas this week remains quoteless for lack of suggestions. Please submit quotes and vote for next week! This Week in Rust is edited by: nellshamrell, llogiq, cdmistman, ericseppanen, extrawurst, andrewpollack, U007D, kolharsam, joelmarcey , mariannegoldin, bennyvasquez. Email list hosting is sponsored by The Rust Foundation Discuss on r/rust << Previous: This Week in Rust 498 Like what you see? Subscribe! [ ] [ ] [Subscribe!] Receive a weekly newsletter. Easy to unsubscribe and no spam, promise. * past issues * atom feed * rss feed * source code * twitter * privacy policy * cc-by-sa-4.0