目录
Rust Weekly-2024年6月5日
欢迎阅读本周 Rust 动态!Rust 是一种让每个人都能构建可靠高效软件的编程语言。 这是其进展和社区的每周总结。
RustNL 2024
- Rust的可视化应用程序设计 - Rik Arends
- ThRust in Space: Initial Momentum - Michaël Melchiore
- Linux内核中的Arc - Alice Ryhl
- 建立连接 - Mara Bos
- 以一步一步替换OpenSSL - Joe Birr-Pixton
- 使用封装函数强化Rust的FFI - Leon Schuermann
- 氧化教育 - Henk Oordt
- 明信片: 机器到机器通信的非常有效工具 - James Munns
- 介绍June - Sophia Turner
- Robius: Rust中沉浸式和无缝的多平台应用程序开发 - Kevin Boos
- 压缩癌变化:在Rust中实现zlib - Folkert de Vries
- K23:运行WASM的安全研究操作系统 - Jonas Kruckenberg
- 在大使馆中的嵌入式系统中使用异步Rust - Dario Nieuwenhuis
- Xilem:让我们构建高性能的Rust用户界面 - Raph Levien
- Rust在娱乐中伤害我的手腕 - Ulf Lilleengen
- 忙碌工程师的类型理论 - Niko Matsakis
通讯简报
项目/工具更新
- 进入天堂- Rust 并行性故事的新篇章
- Tiny Glade、VJ 演出 和 2D 灯光
- Diesel 2.2.0
- Pigg 0.1.0
- git-cliff 2.3.0 已发布!(高度可定制的变更日志生成器)
观察/思考
- 在 Rust 中的借用检查器
- 不用担心生命周期
- Rust不关心内存安全
- 关于Rust中的依赖使用
- 上下文管理器:免费不可放弃的类型
- Rust和动态大小的薄指针
- Rust是为引擎而生,而不是游戏
- [音频]雷鸟 - Brendan Abolivier,软件工程师
Rust演练
- 与Naz一起构建:Rust类型状态模式
- 如何在Rust中构建插件系统
- 形成云
- Rust错误处理:Option和Result
- 让我们在Rust中构建一个负载均衡器-第3部分
- Rust Newtypes的终极指南
杂项
来自“I spent 6 years developing a puzzle game in Rust and it just shipped, AMA”的亮点
本周的特色(crate)
本周的Crate是layoutparser-ort,这是一个LayoutParser的简化版本,用于基于ML的文档布局元素检测。
尽管没有建议,但llogiq 对他的选择感到满意。
你呢?无论你的答案是什么,请提交您的建议并为下周投票!
测试请求
RFC实施的一个重要步骤是让人们尝试实施并提供反馈,特别是在稳定之前。在继续推进之前,以下RFC将受益于用户测试:
如果您是一个功能实现者,希望您的 RFC 出现在上面的列表中,请将新的 call-for-testing 标签添加到您的 RFC 中,
并附上一条评论,提供测试说明和/或有关需要测试的功能方面的指导。
Rust 项目的更新
308 pull requests were merged in the last week
-Znext-solver: eagerly normalize when adding goalsfn_arg_sanity_check: fix panic message- add
--print=check-cfgto get the expected configs - add
-Zfixed-x18 - also InstSimplify
&raw* - also resolve the type of constants, even if we already turned it into an error constant
- avoid unwrap diag.code directly in
note_and_explain_type_err - check index
value <= 0xFFFF_FF00 - coverage: avoid overflow when the MC/DC condition limit is exceeded
- coverage: optionally instrument the RHS of lazy logical operators
- coverage: rename MC/DC
conditions_numtonum_conditions - create const block DefIds in typeck instead of ast lowering
- do not equate
Const's ty insuper_combine_const - do not suggest unresolvable builder methods
- a small diagnostic improvement for
dropping_copy_types - don't recompute
tailinlower_stmts - don't suggest turning non-char-literal exprs of ty
charinto string literals - enable DestinationPropagation by default
- fold item bounds before proving them in
check_type_boundsin new solver - implement
needs_async_dropin rustc and optimize async drop glue - improve diagnostic output of
non_local_definitionslint - make
ProofTreeBuilderactually generic overInterner - make
body_owned_byreturn theBodyinstead of just theBodyId - make
repr(packed)vectors work with SIMD intrinsics - make lint:
lint_dropping_references lint_forgetting_copy_types lint_forgetting_referencesgive suggestion if possible - omit
non-needs_dropdrop_in_placein vtables - opt-in to
FulfillmentErrorgeneration to avoid doing extra work in the new solver - reintroduce name resolution check for trying to access locals from an inline const
- reject
CVarArgsinparse_ty_for_where_clause - show files produced by
--emit fooin json artifact notifications - silence some resolve errors when there have been glob import errors
- stop using
translate_argsin the new solver - support mdBook preprocessors for TRPL in rustbook
- test codegen for
repr(packed,simd)→repr(simd) - tweak relations to no longer rely on
TypeTrace - unroll first iteration of
checked_ilogloop - uplift
{Closure,Coroutine,CoroutineClosure}Argsand friends torustc_type_ir - use parenthetical notation for
Fntraits - add some more specific checks to the MIR validator
- miri: avoid making a full copy of all new allocations
- miri: fix "local crate" detection
- don't inhibit random field reordering on
repr(packed(1)) - avoid checking the edition as much as possible
- increase vtable layout size
- stabilise
IpvNAddr::{BITS, to_bits, from_bits} (ip_bits) - stabilize
custom_code_classes_in_docsfeature - stablize
const_binary_heap_constructor - make
std::env::{set_var, remove_var}unsafe in edition 2024 - implement feature
integer_sign_cast - NVPTX: avoid
PassMode::Directfor args in C abi - genericize
ptr::from_raw_parts std::pal::unix::threadfetching min stack size on netbsd- add an intrinsic for
ptr::metadata - change
f32::midpointto upcast to f64 - rustc-hash: replace hash with faster and better finalized hash
- cargo test: Auto-redact elapsed time
- cargo add: Avoid escaping double-quotes by using string literals
- cargo config: Ensure
--config net.git-fetch-with-cli=trueis respected - cargo new: Dont say were adding to a workspace when a regular package is in root
- cargo toml: Ensure targets are in a deterministic order
- cargo vendor: Ensure sort happens for vendor
- cargo: allows the default git/gitoxide configuration to be obtained from the ENV and config
- cargo: adjust custom err from cert-check due to libgit2 1.8 change
- cargo: skip deserialization of unrelated fields with overlapping name
- clippy:
many_single_char_names: deduplicate diagnostics - clippy: add
needless_character_iterationlint - clippy: deprecate
maybe_misused_cfgandmismatched_target_os - clippy: disable
indexing_slicingfor customIndeximpls - clippy: fix
redundant_closuresuggesting incorrect code withF: Fn() - clippy: let
non_canonical_implsskip proc marco - clippy: ignore array from
deref_addroflint - clippy: make
str_to_stringmachine-applicable - rust-analyzer: add
Function::fn_ptr_type(…)for obtaining name-erased function type - rust-analyzer: don't mark
#[rustc_deprecated_safe_2024]functions as unsafe - rust-analyzer: enable completions within derive helper attributes
- rust-analyzer: fix container search failing for tokens originating within derive attributes
- rust-analyzer: fix diagnostics clearing when flychecks run per-workspace
- rust-analyzer: only generate snippets for
extract_expressions_from_format_stringif snippets are supported - rustfmt: collapse nested if detected by clippy
- rustfmt: rustfmt should not remove inner attributes from inline const blocks
- rustfmt: rust rewrite
check_diff(Skeleton) - rustfmt: use
with_capacityinrewrite_path