This Week in Rust 450
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? 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.
Updates from Rust Community
Official
Announcing Rust 1.62.0
RLS Deprecation
Project/Tooling Updates
rust-analyzer changelog #136
GCC-Rust Feedback Sought - Possibly Aiming For Upstream In GCC 13
Announcing lettre 0.10 - lettre
The last two years in Miri
Fornjot (code-first CAD in Rust) - Weekly Dev Log - 2022-W26
HexoSynth (modular synthesizer) - Devlog 3 - Chunk of GUI Work
Slint UI crate weekly updates
This week in Databend #49: A Modern Cloud Data Warehouse for Everyone
Observations/Thoughts
C++ & Rust: (Interior) Mutability, Moving and Ownership
More than you've ever wanted to know about errors in Rust
Minimalist Guide to Axum
Insights of porting Hugging Face Rust Tokenizers to WASM
[audio] New Rustacean with Chris Krycho
[video] The Future of Programming Languages
Rust Walkthroughs
mirrord internals - hooking libc functions in Rust and fixing bugs
Pathfinding in Rust: A tutorial with examples
Plantuml encoding in Rust using TDD
A const builder pattern in Rust
STM32F4 Embedded Rust at the HAL: Button Controlled Blinking by Timer Polling
[video] Simple error handling in Rust
[video] Making a Rust crate compile faster
[video] Rust for the impatient
[video] Cph.rs Hack Night - Simon Rasmussen on WASM and WAT the fp-bindgen
[video] Cph.rs Hack Night - David Pedersen on Axum
Miscellaneous
[DE] Rust-Code im Linux-Kernel: Merge steht laut Linus Torvalds ab Linux 5.20 bevor
[DE] Ferris Talk #10: Constant Fun mit Rust – const fn
[DE] Programmiersprache Rust 1.62 kann Kernel für x86-64 bauen
[video] Rust Coming Soon To A Linux Kernel Near You!!
Crate of the Week
This week's crate is coprosize, a (you guessed it) program aiding the study of dinosaur dung.
Thanks to piotr for the self-nomination.
Please 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.
If you are a Rust project owner and are looking for contributors, please submit tasks here.
Updates from the Rust Project
415 pull requests were merged in the last week
proc_macro/bridge: stop using a remote object handle for proc_macro Punct and Group
diagnostics: structs with new slug syntax
clean up arg mismatch diagnostic, generalize tuple wrap suggestion
improve some inference diagnostics
some borrowck diagnostic fixes
make TAIT behave exactly like RPIT
fix FFI-unwind unsoundness with mixed panic mode
fix ICE for associated constant generics
fix glob import ICE in rustdoc JSON format
fix rust-call ICE in mir-inliner
fix box with custom allocator in miri
miri: allow non-ZST allocations to be adjacent
miri: enable permissive provenance by default
miri: optimizing Stacked Borrows (part 1?): cache locations of tags in a Borrow Stack
miri: add ./miri clippy
miri: allocation tracking: also print size, alignment, kind of the allocation
miri: stacked borrows: add option for recursive field retagging
miri: tweak int2ptr diagnostics
avoid some &str to String conversions with MultiSpan::push_span_label
avoid unnecessary work in finalize_resolutions_in
don't use match-destructuring for derived ops on structs
enable MIR inlining
improve some deriving code and add a test
optimize non-consuming operators
impl<T: AsRawFd> AsRawFd for {Arc, Box}<T>
add fetch_not method on AtomicBool
optimize Vec::insert for the case where index == len
optimise vectored write
fix data race in thread::scope
cargo: don't panic with --offline
rustfmt: allow #[ignore] tests to run in rustfmt's test suite
rustfmt: config_type: add unstable_variant attribute
clippy: add Operators lint pass
clippy: add invalid_utf8_in_unchecked
clippy: add lint explicit_auto_deref take 2
clippy: don't lint while_let_loop when significant drop order would change
clippy: fix ICE in dereference.rs
clippy: fix #[expect] for most clippy lints
clippy: fix direct #[allow] attributes in let_unit_value
clippy: fix false-positive in equatable_if_let
clippy: new_without_default: ignore const generics/lifetime params on fn new
clippy: trivially_copy_pass_by_ref fixes
let rust-analyzer ship on stable, non-preview
rust-analyzer: complete raw identifier with "r#" prefix
rust-analyzer: show witnesses of non-exhaustiveness in missing-match-arm diagnostic
rust-analyzer: implement destructuring assignment
rust-analyzer: fix regressions on assignment expressions
rust-analyzer: fix attribute macros on assoc items being discarded with disabled proc macros
rust-analyzer: fix: extract Function produces duplicate fn names
rust-analyzer: fix: complete enum variants as patterns in pattern path
rust-analyzer: report proc macro errors in expressions correctly as well
Rust Compiler Performance Triage
Overall the week is a small improvement on average, with some benchmarks (particularly in the primary category) showing significant improvements due to the enablement of MIR inlining in #91743. Inlining promises to improve the quality of our generated LLVM IR and make other optimizations more worthwhile, so it's great to see these early results already being quite impactful.
Triage done by @simulacrum. Revision range: baf382e6..880646c
3 Regressions, 6 Improvements, 6 Mixed; 4 of them in rollups 46 artifact comparisons made in total
See full report for details
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.
Approved RFCs
Changes to Rust follow the Rust RFC (request for comments) process. These are the RFCs that were approved for implementation this week:
No RFCs were approved 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
No RFCs entered Final Comment Period this week.
Tracking Issues & PRs
[disposition: merge] Make outlives::{components,verify} agree
[disposition: merge] Enforce that layout size fits in isize in Layout
[disposition: merge] Tracking Issue for feature(core_c_str) and feature(alloc_c_string)
[disposition: merge] Remove restrictions on compare-exchange memory ordering.
[disposition: merge] Partially stabilize const_slice_from_raw_parts
[disposition: merge] Implement network primitives with ideal Rust layout, not C system layout
[disposition: merge] Tracking Issue for feature future_poll_fn
[disposition: merge] Stabilize const-weak-new
[disposition: merge] stabilise mixed_integer_ops
[disposition: merge] Implement fmt::Write for OsString
[disposition: merge] Tracking Issue for process_set_process_group
New and Updated RFCs
[new] Don't allow unwinding from Drop impls
[new] RFC: Add native code coverage support in Cargo
Upcoming Events
Rusty Events between 2022-07-06 - 2022-08-03 🦀
Virtual
2022-07-06 | Indianapolis, IN, US | Indy Rust
Indy.rs - with Social Distancing
2022-07-07 | Charlottesville, VA, US | Charlottesville Rust Meetup
Rust, nalgebra, and Fourier Optics
2022-07-09 | Virtual | Rust Game Dev
Monthly Meetup
2022-07-11 | Minneapolis, MN, US | Minneapolis Rust Meetup
Rust Meetup - "Lifetimes" and Social Hour
2022-07-12 | Dallas, TX, US | Dallas Rust
Second Tuesday
2022-07-12 | Munich, DE | Rust Munich
Rust Munich 2022 / 2 - hybrid
2022-07-13 | Boulder, CO, US | Boulder Elixir and Rust
Monthly Meetup
2022-07-13 | Malaysia, MY | Rust Malaysia Meetup
Rust Malaysia Meetup
2022-07-14 | Nürnberg, DE | Rust Nurnberg DE
Rust Nürnberg online
2022-07-16 | Vancouver, BC, CA | Vancouver Rust
Rust Study/Hack/Hang-out
2022-07-19 | Sydney, NSW, AU | Rust Australia
Rust Lightning Talks
2022-07-19 | Washington, DC, US | Rust DC
Mid-month Rustful
2022-07-21 | Stuttgart, DE | Rust Community Stuttgart
Rust-Meetup
2022-07-26 | Dallas, TX, US | Dallas Rust
Last Tuesday
2022-07-29 | Minneapolis, MN, US | Minneapolis Rust Meetup
Beginner Rust Open "Office Hours"
2022-07-31 | Seattle, WA, US | Seattle Rust Meetup
Intro to Monads for Rustaceans
2022-08-02 | Buffalo, NY, US | Buffalo Rust Meetup
Buffalo Rust User Group, First Tuesdays
2022-08-03 | Indianapolis, IN, US | Indy Rust
Indy.rs - with Social Distancing
2022-08-03 | Stuttgart, DE | Rust Community Stuttgart
Rust-Meetup
Europe
2022-07-06 | Paris, FR | Stockly
Rust Meetup in Paris
2022-07-12 | Munich, DE | Rust Munich
Rust Munich 2022 / 2 - hybrid
North America
2022-07-11 | Minneapolis, MN, US | Minneapolis Rust Meetup
Rust Meetup - "Lifetimes" and Social Hour
2022-07-13 | Atlanta, GA, US | Rust Atlanta
Grab a beer with fellow Rustaceans
2022-07-14 | Columbus, IL | Columbus Rust Society
Monthly Meeting
2022-07-19 | San Francisco, CA, US | San Francisco Rust Study Group
Rust Hacking in Person
2022-07-26 | Austin, TX, US | ATX Rustaceans
First Official Meetup - July 2022
Oceania
2022-07-28 | Brisbane, QLD, AU | Rust Brisbane
July Meetup
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
Tweet us at @ThisWeekInRust to get your job offers listed here!
Quote of the Week
TIL: #cargo has build-in aliases for some commands
so next time try out
cargo r
cargo b
cargo t
– @5422m4n on twitter
llogiq is pretty pleased with his choice.
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.
Email list hosting is sponsored by The Rust Foundation
Discuss on r/rust
0 notes
欢迎使用 MWeb
MWeb 是专业的 Markdown 写作、记笔记、静态博客生成软件,目前已支持 Mac,iPad 和 iPhone。MWeb 有以下特色:
软件本身:
使用原生的 macOS 技术打造,追求与系统的完美结合。
原则上,首先是追求界面简洁和高性能,然后才是强大易用,功能全面。
Markdown 语法:
使用 GitHub Flavored Markdown 语法,简称 GFM 语法。
支持表格、TOC、LaTeX、代码块、任务列表、脚注等。
画图库支持 mermaid, viz, ECharts, PlantUML, Sequence, Flow。
Markdown 辅助:
支持截图并粘贴、复制并粘贴、拖拽等方式插入图片并直接显示在编辑器内。
在兼容 Markdown 语法的情况下支持设置图片宽度。
好用的表格插入和 LaTeX 书写辅助。
Markdown 输出:
支持导出为图片、HTML、Epub、PDF、RTF、Docx。
支持发布到 WordPress、支持 Metaweblog API 协议的服务、Wordpress.com、印象笔记(Evernote)、Blogger、Medium、Tumblr、语雀、Ghost、少数派 Matrix。
图片上传服务(图床)支持 Imgur、七牛云、又拍云、腾讯云 COS、阿里云 OSS、SM.MS和自定义的图床服务。
Markdown 笔记:
强大的文档库支持分类树和标签管理文档,文档可归类于多个分类,可以把分类整个导出为 Epub、PDF 和生成静态网站。非常合适用于笔记、个人知识收集、管理和输出。
快速笔记:随意增加笔记及图片等素材,支持以天为单位把增加的素材组合在一个文档内,方便整理及记录历史收集情况。
快速搜索:目前已支持全局快捷键调出搜索。
外部 Markdown 文档:
外部 Markdown 文档使用外部模式管理。外部模式使用目录树的方式编辑和管理你的 Markdown 文档,还能很好的支持 GitBook、Jekyll、Hexo 等等编辑和图片插入。
MWeb 文档:
如果要更详细了解 MWeb,建议你一定要去看一下官网的帮助文档,网址为:https://zh.mweb.im/help.html。我们建议在使用文档库之前,一定要阅读一下 MWeb 文档库详细介绍 这篇文章,以便更好的使用文档库。
帮助我们改进 MWeb
如果你喜欢 MWeb,想让它变得更好,你可以:
推荐 MWeb,让更多的人知道。
在 Mac App Store 上评价 (如果是在 MAS 上购买的话)。
GFM 语法简介和 MWeb 所支持的扩展语法
回车转为换行
官方的语法规定结尾加 2 个以上空格加换行才会转成换行,也就是 <br /> 标签。MWeb 中有个选项可以直接把换行转成 <br />,不用加上 2 个以上空格,这个选项默认是开启的。如果要关闭,请在设置页面关闭。
任务列表(Task lists)
Markdown 语法:
- [ ] 任务一 未做任务 `- + 空格 + [ ]` - [x] 任务二 已做任务 `- + 空格 + [x]`
效果如下:
任务一 未做任务 - + 空格 + [ ]
任务二 已做任务 - + 空格 + [x]
图片大小及对齐
官方和 GFM 都不支持图片大小设置,MWeb 引入的特别的语法来设置图片宽度。如:![图片说明-w450](pic.jpg) 这样表示设置图片宽度为 450。其中 -w450 为设置语法,生成 HTML 时会自动移除。w 表示设置宽度。 可以看出,MWeb 引入的语法的特点是兼容原来的语法和仅支持设置���度。
多行或者一段代码
Markdown 语法:
```js function fancyAlert(arg) { if(arg) { $.facebox({div:'#foo'}) } } ```
效果如下:
function fancyAlert(arg) { if(arg) { $.facebox({div:'#foo'}) } }
这个语法目前在 MWeb 中使用,必须前后空一行,才会正确解析。我觉得,在写 Markdown 文档过程中,运用空行很有必要,基本上,块级元素(标题、列表、引用、代码块、表格、段落等),都建议前后空一行。
表格
Markdown 语法:
第一格表头 | 第二格表头 --------- | ------------- 内容单元格 第一列第一格 | 内容单元格第二列第一格 内容单元格 第一列第二格 多加文字 | 内容单元格第二列第二格
效果如下:
第一格表头 第二格表头 内容单元格 第一列第一格 内容单元格第二列第一格 内容单元格 第一列第二格 多加文字 内容单元格第二列第二格
删除线
Markdown 语法:
加删除线像这样用: ~~删除这些~~
效果如下:
加删除线像这样用: 删除这些
LaTeX
Markdown 语法:
块级公式: ```math x = \dfrac{-b \pm \sqrt{b^2 - 4ac}}{2a} ``` 行内公式: ``\Gamma(n) = (n-1)!\quad\forall n\in\mathbb N``
效果如下(在设置页面中启用 LaTeX 才会看到效果):
块级公式:
\[x = \dfrac{-b \pm \sqrt{b^2 - 4ac}}{2a} \]
行内公式: \(\Gamma(n) = (n-1)!\quad\forall n\in\mathbb N\)
注意:为了兼容 MWeb 3,也支持 \(\Gamma(n) = (n-1)!\quad\forall n\in\mathbb N\)
和块级语法
\( x = \dfrac{-b \pm \sqrt{b^2 - 4ac}}{2a} \)
但是建议用新的语法。
MWeb 画图
mermaid
mermaid 是比较流行的画图库,它支持流程图、顺序图和甘特图,它的官网为:https://mermaidjs.github.io/ ,在 MWeb 中使用 mermaid 的语法就是声明代码块的语言为 mermaid,代码块中再写上 mermaid 的画图语法即可,你可以把下面的语法复制到 MWeb 中查看效果。
```mermaid sequenceDiagram participant Alice participant Bob Alice->John: Hello John, how are you? loop Healthcheck John->John: Fight against hypochondria end Note right of John: Rational thoughts <br/>prevail... John-->Alice: Great! John->Bob: How about you? Bob-->John: Jolly good! ```
效果如下:
sequenceDiagram participant Alice participant Bob Alice->John: Hello John, how are you? loop Healthcheck John->John: Fight against hypochondria end Note right of John: Rational thoughts <br/>prevail... John-->Alice: Great! John->Bob: How about you? Bob-->John: Jolly good!
echarts
echarts 是百度出品的 js 画图库,它的网址为:https://echarts.apache.org/zh/index.html,功能非常强大,MWeb 支持 echarts 的一些基本的用法,太高级的不支持。你可以将以下语法复制到 MWeb 中进行尝试。你也可以去 https://echarts.apache.org/examples/zh/index.html 这个网址查看一些例子,要注意的是 MWeb 只能解析 option = {} 这种简单的,不过应该是足够使用了。
```echarts option = { xAxis: { type: 'category', data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'] }, yAxis: { type: 'value' }, series: [{ data: [820, 932, 901, 934, 1290, 1330, 1320], type: 'line' }] }; ```
效果如下:
option = { xAxis: { type: 'category', data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'] }, yAxis: { type: 'value' }, series: [{ data: [820, 932, 901, 934, 1290, 1330, 1320], type: 'line' }] };
脚注(Footnote)
Markdown 语法:
这是一个脚注:[^1]
效果如下:
这是一个脚注:1
注释和阅读更多
注 阅读更多的功能只用在文档库生成静态网站或发布到 Wordpress 博客时,插入时注意要后空一行。
这里是脚注信息 ↩
1 note
·
View note