Skip to content

Commit 47aff1d

Browse files
bors[bot]japaric
andcommitted
Merge #27
27: add newsletter 15, empty newsletter 16 and newsletter template r=jamesmunns a=japaric this also changes the submission model from comments in an issue to PRs sent by the community r? @rust-embedded/resources cc @jamesmunns Co-authored-by: Jorge Aparicio <[email protected]>
2 parents 01316bc + e5d8d66 commit 47aff1d

File tree

3 files changed

+325
-0
lines changed

3 files changed

+325
-0
lines changed

content/2019-02-20-newsletter-15.md

Lines changed: 195 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,195 @@
1+
+++
2+
title = "The Embedded Working Group Newsletter - 15"
3+
date = 2019-02-20
4+
draft = false
5+
in_search_index = true
6+
template = "page.html"
7+
+++
8+
9+
This is the fifteenth newsletter of the [Embedded WG] where we highlight new progress, celebrate cool projects, thank the community, and advertise projects that need help!
10+
11+
[Embedded WG]: https://github.com/rust-embedded/wg
12+
13+
<!-- Discuss on [users.rust-lang.org], [on twitter], or [on reddit]! -->
14+
15+
<!-- [users.rust-lang.org]: https://example.org/#TODO -->
16+
<!-- [on twitter]: https://example.org/#TODO -->
17+
<!-- [on reddit]: https://example.org/#TODO -->
18+
19+
If you want to mention something in [the next newsletter], send us a pull request!
20+
21+
[the next newsletter]: https://github.com/rust-embedded/blog/edit/master/content/2019-03-06-newsletter-16.md
22+
23+
## Embedded at Rust All Hands 2019
24+
25+
Some members of the Embedded Working Group attended the Rust All Hands two weeks ago. There they had the chance to discuss the needs of the embedded community (as identified in [this survey]) with the different Rust teams and other WGs. Here's a summary of what was discussed:
26+
27+
[this survey]: https://github.com/rust-embedded/wg/issues/256
28+
29+
- "const generics"
30+
31+
The ability to parameterize over values, for example you could use this feature to write a fixed capacity `Vec`: `struct Vec<T, const N: usize> { buffer: [T; N], len: usize }`. There are a few compiler refactors going on that are required to land this in nightly so the status is "WIP". We'll have future meetings with the compiler team to try to identify and prioritize the parts of the feature that embedded developers need.
32+
33+
- `const fn` with trait bounds on stable.
34+
35+
For example, `impl<T> Struct<T> where T: Trait { pub const fn new() -> Self { .. } }`. A lengthy [pre-RFC discussion][const-eval#8] has concluded and a [proper RFC has been proposed][rfc2632].
36+
37+
[const-eval#8]: https://github.com/rust-rfcs/const-eval/pull/8
38+
[rfc2632]: https://github.com/rust-lang/rfcs/pull/2632
39+
40+
- `core::mem::MaybeUninit` on stable.
41+
42+
The plan is to stabilize a [minimal, uncontroversial subset of the API][maybe_uninit] to make this available on stable ASAP.
43+
44+
[maybe_uninit]: https://github.com/rust-lang/rust/issues/53491#issuecomment-463753719
45+
46+
- `std::io` in `core` / `alloc`.
47+
48+
It's not possible to move `std::io::{Read,Write}` into `alloc` or `core` because the API depends on OS specific bits (e.g. `last_os_error`). An option may be to add a new set of `Read` / `Write` traits to `core`, maybe with associated error types, and then try to bridge these to `std::io::{Read,Write}` using blanket implementations / super traits, but this needs more research.
49+
50+
- fix [rust-lang/cargo#5730]
51+
52+
This bug breaks `no_std` builds that use build scripts unless the authors of the build dependencies are aware of the issue and actively work around it. The Cargo team is well aware of the problem. Unfortunately, it's hard to fix and the fix will likely be opt-in because it changes the current semantics.
53+
54+
[rust-lang/cargo#5730]: https://github.com/rust-lang/cargo/issues/5730
55+
56+
- Stabilize RFC 2282 - ["Cargo profile dependencies"]
57+
58+
This feature lets you optimize dependencies when using the `dev` profile; useful to keep `dev` binaries small enough to fit in Flash without sacrificing all debuggability. A new [`build` profile][profile.build] will be added to cover the configuration of proc macros, build scripts, compiler plugins and their dependencies. The new profile solves the remaining unresolved question around RFC 2282.
59+
60+
["Cargo profile dependencies"]: https://github.com/rust-lang/rust/issues/48683
61+
[profile.build]: https://github.com/rust-lang/cargo/pull/6577
62+
63+
- Stabilize `core::arch::arm`
64+
65+
This module contains functions for instructions like `wfi` and `nop`, and SIMD instructions; stabilizing this removes the pressure for stable inline assembly (`asm!`). A member of the libs team is interested in this and will help us push it towards the finish line. [A PR in this space][stdsimd#557] has recently landed.
66+
67+
[stdsimd#557]: https://github.com/rust-lang-nursery/stdsimd/pull/557
68+
69+
- Asserts in `const fn` context become compiler errors.
70+
71+
We understood that there are still several design / implementation issues that need to be discussed before this is stabilized, but in the meantime you can use the perma-unstable `-Z unleash-the-miri-inside-of-you` flag to do all sort of stuff in const context.
72+
73+
- std-aware Cargo.
74+
75+
[@jamesmunns] has written a [pre-rfc] for an incremental implementation of this feature based on our discussions with people from the libs and Cargo teams and the WASM WG.
76+
77+
[@jamesmunns]: https://github.com/jamesmunns
78+
[pre-rfc]: https://github.com/jamesmunns/rfcs/pull/1
79+
80+
- Improve searching for `no_std` crates on crates.io.
81+
82+
The backend supports searching within a category (like the `no_std` category) but there's no UI for it right now. This and fixing a bug where searches only return items found until a exact match was found (instead of returning all relevant matches) are in the crates.io team TODO list.
83+
84+
- Fix: infinite loops (e.g. `loop {}`) are lowered to an abort instruction.
85+
86+
Ideally, this should be fixed in LLVM proper but it's hard to fix. It's possible to fix this in rustc but the fix is likely to regress the performance of `loop`s. The compiler team will follow up with two unstable flags to evaluate the (performance) impact of fixing this. The first flag applies the fix to only `loop`s in return position of divergent function and the second flag applies the fix to all `loop`s.
87+
88+
- Math support in core
89+
90+
That is `0f32.sin()` should "Just Work" in `no_std` crates. There are a few questions about how to best implement this without degrading performance of applications that link to `std` (we want those to use the arch optimized routines in e.g. glibc's libm instead of the generic Rust implementation) and we need a champion to do the research.
91+
92+
- Cargo build hooks
93+
94+
This refers to the ability to run custom code after `cargo build`. We covered use cases, their requirements and discussed the trade-offs of a more general Cargo tasks (e.g. `cargo $task`) mechanism vs a more targeted post-build script (e.g. `post-build.rs`) mechanism. Expect more news (a (pre-)RFC) from the WASM WG on this front.
95+
96+
- Slimmer `core::fmt`.
97+
98+
The current implementation of `core::fmt` uses trait objects and function pointers to make all uses of `core::fmt` fast to compile but this makes `core::fmt` impossible to inline which makes `no_std` programs that use formatting large in (binary) size. It might be possible to leverage std-aware Cargo to fix this: we could add a Cargo feature to `core` to replace the current implementation with one that's fully inlineable but as featureful as the current one -- this should produce smaller binaries.
99+
100+
For a bit more of detail you can check the [logs] and [minutes] from two meetings ago; they include our notes from the All Hands
101+
102+
[logs]: https://github.com/rust-embedded/wg/blob/master/minutes/2019-02-12.irc.log
103+
[minutes]: https://github.com/rust-embedded/wg/blob/master/minutes/2019-02-12.md#notes-from-rust-all-hands
104+
105+
## Highlights
106+
107+
- The Embedded WG has started receiving [submissions] for [the embedded showcase][showcase]! We are looking for cool embedded Rust projects with visuals (pictures or videos) that can serve as examples of what can be done in Rust.
108+
109+
[submissions]: https://github.com/rust-embedded/showcase#submit-your-project
110+
[showcase]: https://github.com/rust-embedded/showcase
111+
112+
- The [stm32-rs] organization has emerged to collate work on STM32 crates.
113+
114+
[stm32-rs]: https://github.com/stm32-rs
115+
116+
- Similarly, the [lpc-rs] organization has emerged to work on LPC microcontrollers by NXP.
117+
118+
[lpc-rs]: https://github.com/lpc-rs
119+
120+
- Also, the [nrf-rs] organization has emerged to focus on the nRF family of microcontrollers by Nordic Semiconductors.
121+
122+
[nrf-rs]: https://github.com/nrf-rs
123+
124+
- [@adamgreig] has released an experimental PAC (Peripheral Access Crate) alternative for STM32 microcontrollers: [stm32ral] that compiles in about 3 seconds. (PACs are known for compile times in the order of hundreds of seconds.)
125+
126+
[@adamgreig]: https://github.com/adamgreig
127+
[stm32ral]: https://github.com/adamgreig/stm32ral
128+
129+
- As of `nightly-2019-02-05` the [embedded Rust Book][book] is included as part of the docs shipped with the Rust toolchain! [This is the online version](https://doc.rust-lang.org/nightly/#embedded-systems).
130+
131+
[book]: https://docs.rust-embedded.org/book/index.html
132+
133+
- The Rust compiler now has [cross compilation support for 64-bit RISCV][rust#58406]. Install the bare metal targets with `rustup target` (see `rustup target list`).
134+
135+
[rust#58406]: https://github.com/rust-lang/rust/pull/58406
136+
137+
- The Rust compiler also gained [compilation support for x86_64 UEFI][rust#56769] in the form of the `x86_64-unknown-uefi` target.
138+
139+
[rust#56769]: https://github.com/rust-lang/rust/pull/56769
140+
141+
- Formatting numbers with `core::fmt` has [become slimmer][rust#58272]. Some users have reported binary size reductions of up to 26% (800B) in ARMv6-M binaries.
142+
143+
[rust#58272]: https://github.com/rust-lang/rust/pull/58272
144+
145+
- The [copterust org][copterust] has [shared a bunch of driver crates][aer#142] for interfacing sensors commonly found in flight controllers (drones).
146+
147+
[copterust]: https://github.com/copterust/
148+
[aer#142]: https://github.com/rust-embedded/awesome-embedded-rust/pull/142
149+
150+
## Embedded Projects
151+
152+
If you have an embedded project or blog post you would like to have featured in the Embedded WG Newsletter, make sure to add it to [the next newsletter], we would love to show it off!
153+
154+
- Version v0.4.1 of [Real Time For the Masses][rtfm] (RTFM), a concurrency framework for building real time systems, has been released! This version [fixes a soundness hole][rtfm#140] and includes a [Russian translation] of the RTFM book.
155+
156+
[rtfm]: https://crates.io/crates/cortex-m-rtfm
157+
[rtfm#140]: https://github.com/japaric/cortex-m-rtfm/pull/140
158+
[Russian translation]: https://japaric.github.io/cortex-m-rtfm/book/ru/index.html
159+
160+
- [@jamwaffles] has [published](https://mobile.twitter.com/jam_waffles/status/1095784282189189121) a driver crate for the SH1106, an OLED display, and an [introduction blog post](https://wapl.es/electronics/rust/2019/02/13/sh1106-driver.html) for their crate.
161+
162+
[@jamwaffles]: https://github.com/jamwaffles
163+
164+
- [@thejpster] has [released](https://www.reddit.com/r/rust/comments/ascvls/introducing_embeddedsdmmc_a_purerust_no_std_sd/) [`embedded-sdmmc`], a pure-Rust #[no_std] SD card and FAT16/FAT32 library
165+
166+
[@thejpster]: https://github.com/thejpster
167+
[`embedded-sdmmc`]: https://crates.io/crates/embedded-sdmmc
168+
169+
- [@hannobraun] has published two crates: [`ieee802154`], a partial implementation of the IEEE 802.15.4 standard, and [`dw1000`], an embedded-hal driver for the Decawave DW1000 wireless transceiver chip.
170+
171+
[@hannobraun]: https://github.com/hannobraun
172+
[`ieee802154`]: https://crates.io/crates/ieee802154
173+
[`dw1000`]: https://crates.io/crates/dw1000
174+
175+
## `embedded-hal` Ecosystem Crates
176+
177+
As part of the [Weekly Driver Initiative], crates that are part of the `embedded-hal` ecosystem are now tracked in the [Awesome Embedded Rust] repository. Here is a current snapshot of what is available there:
178+
179+
| Type | Status | Count | Diff |
180+
| :--- | :----- | :---- | :--- |
181+
| [Device Crates] | released | 16 | 0 |
182+
| [HAL Impl Crates] | released | 15 | +2 |
183+
| [Board Support Crates] | released | 13 | +2 |
184+
| [Driver Crates Released] | released | 19 | +3 |
185+
| [Driver Crates WIP] | WIP | 59 | +13 |
186+
| [no-std crates] | released | 23 | +6 |
187+
188+
[Awesome Embedded Rust]: https://github.com/rust-embedded/awesome-embedded-rust
189+
[Weekly Driver Initiative]: https://github.com/rust-embedded/wg/issues/39
190+
[Device Crates]: https://github.com/rust-embedded/awesome-embedded-rust#device-crates
191+
[HAL Impl Crates]: https://github.com/rust-embedded/awesome-embedded-rust#hal-implementation-crates
192+
[Board Support Crates]: https://github.com/rust-embedded/awesome-embedded-rust#board-support-crates
193+
[Driver Crates Released]: https://github.com/rust-embedded/awesome-embedded-rust#driver-crates
194+
[Driver Crates WIP]: https://github.com/rust-embedded/awesome-embedded-rust#wip
195+
[no-std crates]: https://github.com/rust-embedded/awesome-embedded-rust#no-std-crates

content/2019-03-06-newsletter-16.md

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
+++
2+
title = "The Embedded Working Group Newsletter - 16"
3+
date = 2019-03-06
4+
draft = true
5+
in_search_index = false
6+
template = "page.html"
7+
+++
8+
9+
<!-- TODO before release set `draft` to `false` and `in_search_index` to `true` -->
10+
11+
This is the sixteenth newsletter of the [Embedded WG] where we highlight new progress, celebrate cool projects, thank the community, and advertise projects that need help!
12+
13+
[Embedded WG]: https://github.com/rust-embedded/wg
14+
15+
<!-- TODO uncomment -->
16+
17+
<!-- Discuss on [users.rust-lang.org], [on twitter], or [on reddit]! -->
18+
19+
<!-- [users.rust-lang.org]: https://example.org/#TODO -->
20+
<!-- [on twitter]: https://example.org/#TODO -->
21+
<!-- [on reddit]: https://example.org/#TODO -->
22+
23+
If you want to mention something in [the next newsletter], send us a pull request!
24+
25+
[the next newsletter]: https://github.com/rust-embedded/blog/edit/master/content/2019-03-20-newsletter-17.md
26+
27+
## Highlights
28+
29+
<!-- TODO Add news related to embedded Rust that are not about new crates releases here -->
30+
31+
- TODO(remove, this is an example) "const generics" has landed in nightly!
32+
33+
- TODO(remove, this is an example) the Rust compiler has gained cross compilation support for the Xtensa architecture!
34+
35+
## Embedded Projects
36+
37+
<!-- TODO Add news about embedded projects here -->
38+
39+
If you have an embedded project or blog post you would like to have featured in the Embedded WG Newsletter, make sure to add it to [the next newsletter], we would love to show it off!
40+
41+
## `embedded-hal` Ecosystem Crates
42+
43+
<hr>
44+
45+
As part of the [Weekly Driver Initiative], crates that are part of the `embedded-hal` ecosystem are now tracked in the [Awesome Embedded Rust] repository. Here is a current snapshot of what is available there:
46+
47+
<!-- TODO update these numbers before release -->
48+
49+
| Type | Status | Count | Diff |
50+
| :--- | :----- | :---- | :--- |
51+
| [Device Crates] | released | 16 | 0 |
52+
| [HAL Impl Crates] | released | 13 | 0 |
53+
| [Board Support Crates] | released | 11 | 0 |
54+
| [Driver Crates Released] | released | 16 | +1 |
55+
| [Driver Crates WIP] | WIP | 46 | +6 |
56+
| [no-std crates] | released | 17 | +3 |
57+
58+
[Awesome Embedded Rust]: https://github.com/rust-embedded/awesome-embedded-rust
59+
[Weekly Driver Initiative]: https://github.com/rust-embedded/wg/issues/39
60+
[Device Crates]: https://github.com/rust-embedded/awesome-embedded-rust#device-crates
61+
[HAL Impl Crates]: https://github.com/rust-embedded/awesome-embedded-rust#hal-implementation-crates
62+
[Board Support Crates]: https://github.com/rust-embedded/awesome-embedded-rust#board-support-crates
63+
[Driver Crates Released]: https://github.com/rust-embedded/awesome-embedded-rust#driver-crates
64+
[Driver Crates WIP]: https://github.com/rust-embedded/awesome-embedded-rust#wip
65+
[no-std crates]: https://github.com/rust-embedded/awesome-embedded-rust#no-std-crates

newsletter-template.md

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
+++
2+
title = "The Embedded Working Group Newsletter - 16"
3+
date = 2019-03-06
4+
draft = true
5+
in_search_index = false
6+
template = "page.html"
7+
+++
8+
9+
<!-- TODO before release set `draft` to `false` and `in_search_index` to `true` -->
10+
11+
This is the sixteenth newsletter of the [Embedded WG] where we highlight new progress, celebrate cool projects, thank the community, and advertise projects that need help!
12+
13+
[Embedded WG]: https://github.com/rust-embedded/wg
14+
15+
<!-- TODO uncomment -->
16+
17+
<!-- Discuss on [users.rust-lang.org], [on twitter], or [on reddit]! -->
18+
19+
<!-- [users.rust-lang.org]: https://example.org/#TODO -->
20+
<!-- [on twitter]: https://example.org/#TODO -->
21+
<!-- [on reddit]: https://example.org/#TODO -->
22+
23+
If you want to mention something in [the next newsletter], send us a pull request!
24+
25+
[the next newsletter]: https://github.com/rust-embedded/blog/edit/master/content/2019-03-20-newsletter-17.md
26+
27+
## Highlights
28+
29+
<!-- TODO Add news related to embedded Rust that are not about new crates releases here -->
30+
31+
- TODO(remove, this is an example) "const generics" has landed in nightly!
32+
33+
- TODO(remove, this is an example) the Rust compiler has gained cross compilation support for the Xtensa architecture!
34+
35+
## Embedded Projects
36+
37+
<!-- TODO Add news about embedded projects here -->
38+
39+
If you have an embedded project or blog post you would like to have featured in the Embedded WG Newsletter, make sure to add it to [the next newsletter], we would love to show it off!
40+
41+
## `embedded-hal` Ecosystem Crates
42+
43+
<hr>
44+
45+
As part of the [Weekly Driver Initiative], crates that are part of the `embedded-hal` ecosystem are now tracked in the [Awesome Embedded Rust] repository. Here is a current snapshot of what is available there:
46+
47+
<!-- TODO update these numbers before release -->
48+
49+
| Type | Status | Count | Diff |
50+
| :--- | :----- | :---- | :--- |
51+
| [Device Crates] | released | 16 | 0 |
52+
| [HAL Impl Crates] | released | 13 | 0 |
53+
| [Board Support Crates] | released | 11 | 0 |
54+
| [Driver Crates Released] | released | 16 | +1 |
55+
| [Driver Crates WIP] | WIP | 46 | +6 |
56+
| [no-std crates] | released | 17 | +3 |
57+
58+
[Awesome Embedded Rust]: https://github.com/rust-embedded/awesome-embedded-rust
59+
[Weekly Driver Initiative]: https://github.com/rust-embedded/wg/issues/39
60+
[Device Crates]: https://github.com/rust-embedded/awesome-embedded-rust#device-crates
61+
[HAL Impl Crates]: https://github.com/rust-embedded/awesome-embedded-rust#hal-implementation-crates
62+
[Board Support Crates]: https://github.com/rust-embedded/awesome-embedded-rust#board-support-crates
63+
[Driver Crates Released]: https://github.com/rust-embedded/awesome-embedded-rust#driver-crates
64+
[Driver Crates WIP]: https://github.com/rust-embedded/awesome-embedded-rust#wip
65+
[no-std crates]: https://github.com/rust-embedded/awesome-embedded-rust#no-std-crates

0 commit comments

Comments
 (0)