内容简介:Hello and welcome to another issue ofCheck out
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 .
This Week in Rust is openly developed on GitHub . If you find any errors in this week's issue, please submit a PR .
Check out this week's This Week in Rust Podcast
Updates from Rust Community
News & Blog Posts
- A practical guide to async in Rust
- Secure Rust Guidelines - ANSSI (National Cybersecurity Agency of France)
- Faster Rust development on AWS EC2 with VSCode
- Rust verification tools
- Examining ARM vs X86 Memory Models with Rust
- Disk space and LTO improvements
- Building a faster CouchDB View Server in Rust
- Implementing a Job queue with SQLx and Postgres
- Rust + Actix + CosmosDB (MongoDB) tutorial api
- Extremely Simple Rust Rocket Framework Tutorial
- Build a Smart Bookmarking Tool with Rust and Rocket
- A Future is a Suspending Scheduler
- Cross building Rust GStreamer plugins for the Raspberry Pi
- xi-editor retrospective
- This month in my Database project written in Rust
- A Few More Reasons Rust Compiles Slowly
- Fixing Rust's test suite on RISC-V
- Protobuf code generation in Rust
- Tracking eye centers location with Rust & OpenCV
- Using rust, blurz to read from a BLE device
- rust-analyzer changelog #31
- IntelliJ Rust Changelog #125
- [video] Manipulating ports, virtual ports and pseudo terminals - Rust Wrocław Webinar
- [video] Rust Stream: Iterators
Crate of the Week
This week's crate is print_bytes , a library to print arbitrary bytes to a stream as losslessly as possible.
Thanks to dylni for the suggestion!
Submit your suggestions and votes 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.
- Gooseberry: Set the kb_dir somewhere more accessible to the user
- Ruma: Add directory and profile query endpoints
If you are a Rust project owner and are looking for contributors, please submit tasks here .
Updates from Rust Core
339 pull requests were merged in the last week
- move leak-check to during coherence, candidate eval
-
account for multiple impl/dyn Trait in return type when suggesting
'_
- tweak binop errors
- adds a clearer message for when the async keyword is missing from a function
- allow dynamic linking for iOS/tvOS targets
-
always capture tokens for
macro_rules!
arguments - change heuristic for determining range literal
- check for assignments between non-conflicting generator saved locals
- const prop: erase all block-only locals at the end of every block
- emit line info for generator variants
-
explain move errors that occur due to method calls involving
self
- fix handling of reserved registers for ARM inline asm
- improve compiler error message for wrong generic parameter order
- point at the call span when overflow occurs during monomorphization
- provide suggestions for some moved value errors
- self contained linking option
-
perform obligation deduplication to avoid buggy
ExistentialMismatch
- show the values and computation that would overflow a const evaluation or propagation
-
stabilize
#![feature(const_if_match)]
and#![feature(const_loop)]
- A way forward for pointer equality in const eval
- the const propagator cannot trace references
- warn if linking to a private item
-
improper_ctypes_definitions
lint - add Windows system error codes that should map to io::ErrorKind::TimedOut
-
errors: use
-Z terminal-width
in JSON emitter - proc_macro: stop flattening groups with dummy spans
-
rustc_lint: only query
typeck_tables_of
when a lint needs it - rustdoc: fix doc aliases with crate filtering
- chalk: .chalk file syntax writer
- chalk: add method to get repr data of an ADT to ChalkDatabase
-
chalk: fix built-in
Fn
impls when generics are involved - chalk: fix coherence issue with associated types in generic bound
- miri: implement rwlocks on Windows
- miri: supply our own implementation of the CTFE pointer comparison intrinsics
- shortcuts for min/max on ordinary BTreeMap/BTreeSet iterators
-
add
TryFrom<{int}>
forNonZero{int}
-
add a fast path for
std::thread::panicking
. -
add
[T]::partition_point
-
add unstable
core::mem::variant_count
intrinsic - added io forwarding methods to the stdio structs
-
stabilize
leading_trailing_ones
-
impl PartialEq<Vec<B>> for &[A], &mut [A]
-
forward
Hash::write_iN
toHash::write_uN
- libc: add ancillary socket data accessor functions for solarish OSes
- libc: FreeBSD: machine register structs
- libc: add wexecv, wexecve, wexecvp, wexecvpe
-
cargo: add support for
workspace.metadata
table - cargo: adding environment variable CARGO_PKG_LICENSE_FILE
- cargo: enable "--target-dir" in "cargo install"
- cargo: expose built cdylib artifacts in the Compilation structure
-
cargo: improve support for non-
master
main branches - docs.rs: don't panic when a crate doesn't exist for target-redirect
- docs.rs: improve executing tests
- clippy: lint iterator.map(|x| x)
-
clippy: new lint: suggest
ptr::read
instead ofmem::replace(..., uninitialized())
- clippy: clippy-driver: pass all args to rustc if --rustc is present
- clippy: cmp_owned: handle when PartialEq is not implemented symmetrically
- rustfmt: do not reorder module declaration with #![macro_use]
- rustfmt: don't reformat with errors unless --force flag supplied
Rust Compiler Performance Triage
- 2020-06-30 . Three regressions, two of them on rollups; two improvements, one on a rollup.
Approved RFCs
Changes to Rust follow the Rust RFC (request for comments) process . These are the RFCs that were approved for implementation this week:
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
Tracking Issues & PRs
-
[disposition: merge]
impl
From<char>
for String - [disposition: merge] mv std libs to std/
-
[disposition: merge]
Stabilize
transmute
in constants and statics but not const fn -
[disposition: merge]
added
.collect()
into String fromBox<str>
- [disposition: merge] Stabilize const_type_id feature
New RFCs
- Linking modifiers for native libraries
- Hierarchic anonymous life-time
- Portable packed SIMD vector type
- crates.io token scopes
Upcoming Events
Online
- June 30. Berlin, DE - Remote - Berlin Rust - Rust and Tell
- July 1. Johannesburg, ZA - Remote - Monthly Joburg Rust Chat!
- July 1. Dublin, IE - Remote - Rust Dublin - July Remote Meetup
- July 1. Indianapolis, IN, US - Indy Rust - Indy.rs - with Social Distancing
- July 13. Seattle, WA, US - Seattle Rust Meetup - Monthly Meetup
North America
- June 30. Dallas, TX, US - Dallas Rust - Last Tuesday
- July 8. Atlanta, GA, US - Rust Atlanta - Grab a beer with fellow Rustaceans
- July 9. Lehi, UT, US - Utah Rust - The Blue Pill: Rust on Microcontrollers
Asia Pacific
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.
Rust Jobs
- Senior Software Engineer - Backend at LogDNA, Remote, US
- Senior Software Engineer - Protocols in Rust at Ockam, Remote
Tweet us at @ThisWeekInRust to get your job offers listed here!
Quote of the Week
References are a sharp tool and there are roughly three different approaches to sharp tools.
- Don't give programmers sharp tools. They may make mistakes and cut their fingers off. This is the Java/Python/Perl/Ruby/PHP... approach.
- Give programmers all the sharp tools they want. They are professionals and if they cut their fingers off it's their own fault. This is the C/C++ approach.
- Give programmers sharp tools, but put guards on them so they can't accidentally cut their fingers off. This is Rust's approach.
Lifetime annotations are a safety guard on references. Rust's references have no sychronization and no reference counting -- that's what makes them sharp. References in category-1 languages (which typically do have synchronization and reference counting) are "blunted": they're not really quite as effective as category-2 and -3 references, but they don't cut you, and they still work; they might just slow you down a bit.
So, frankly, I like lifetime annotations because they prevent me from cutting my fingers off.
Thanks to Ivan Tham for the suggestions!
Please submit quotes and vote for next week!
This Week in Rust is edited by: nellshamrell , llogiq , and cdmistman .
Discuss on r/rust
以上就是本文的全部内容,希望本文的内容对大家的学习或者工作能带来一定的帮助,也希望大家多多支持 码农网
猜你喜欢:本站部分资源来源于网络,本站转载出于传递更多信息之目的,版权归原作者或者来源机构所有,如转载稿涉及版权问题,请联系我们。
Effective Objective-C 2.0
Matt Galloway / 爱飞翔 / 机械工业出版社 / 2014-1 / 69.00元
《effective objective-c 2.0:编写高质量ios与os x代码的52个有效方法》是世界级c++开发大师scott meyers亲自担当顾问编辑的“effective software development series”系列丛书中的新作,amazon全五星评价。从语法、接口与api设计、内存管理、框架等7大方面总结和探讨了objective-c编程中52个鲜为人知和容易被忽......一起来看看 《Effective Objective-C 2.0》 这本书的介绍吧!