Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add newsletter 15, empty newsletter 16 and newsletter template #27

Merged
merged 10 commits into from
Feb 20, 2019
195 changes: 195 additions & 0 deletions content/2019-02-20-newsletter-15.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,195 @@
+++
title = "The Embedded Working Group Newsletter - 15"
date = 2019-02-20
draft = false
in_search_index = true
template = "page.html"
+++

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!

[Embedded WG]: https://github.com/rust-embedded/wg

<!-- Discuss on [users.rust-lang.org], [on twitter], or [on reddit]! -->

<!-- [users.rust-lang.org]: https://example.org/#TODO -->
<!-- [on twitter]: https://example.org/#TODO -->
<!-- [on reddit]: https://example.org/#TODO -->

If you want to mention something in [the next newsletter], send us a pull request!

[the next newsletter]: https://github.com/rust-embedded/blog/edit/master/content/2019-03-06-newsletter-16.md

## Embedded at Rust All Hands 2019

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:

[this survey]: https://github.com/rust-embedded/wg/issues/256

- "const generics"

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.

- `const fn` with trait bounds on stable.

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].

[const-eval#8]: https://github.com/rust-rfcs/const-eval/pull/8
[rfc2632]: https://github.com/rust-lang/rfcs/pull/2632

- `core::mem::MaybeUninit` on stable.

The plan is to stabilize a [minimal, uncontroversial subset of the API][maybe_uninit] to make this available on stable ASAP.

[maybe_uninit]: https://github.com/rust-lang/rust/issues/53491#issuecomment-463753719

- `std::io` in `core` / `alloc`.

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.

- fix [rust-lang/cargo#5730]

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.

[rust-lang/cargo#5730]: https://github.com/rust-lang/cargo/issues/5730

- Stabilize RFC 2282 - ["Cargo profile dependencies"]

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.

["Cargo profile dependencies"]: https://github.com/rust-lang/rust/issues/48683
[profile.build]: https://github.com/rust-lang/cargo/pull/6577

- Stabilize `core::arch::arm`

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.

[stdsimd#557]: https://github.com/rust-lang-nursery/stdsimd/pull/557

- Asserts in `const fn` context become compiler errors.

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.

- std-aware Cargo.

[@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.

[@jamesmunns]: https://github.com/jamesmunns
[pre-rfc]: https://github.com/jamesmunns/rfcs/pull/1

- Improve searching for `no_std` crates on crates.io.

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.

- Fix: infinite loops (e.g. `loop {}`) are lowered to an abort instruction.

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.

- Math support in core

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.

- Cargo build hooks

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.

- Slimmer `core::fmt`.

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.

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

[logs]: https://github.com/rust-embedded/wg/blob/master/minutes/2019-02-12.irc.log
[minutes]: https://github.com/rust-embedded/wg/blob/master/minutes/2019-02-12.md#notes-from-rust-all-hands

## Highlights

- 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.

[submissions]: https://github.com/rust-embedded/showcase#submit-your-project
[showcase]: https://github.com/rust-embedded/showcase

- The [stm32-rs] organization has emerged to collate work on STM32 crates.

[stm32-rs]: https://github.com/stm32-rs

- Similarly, the [lpc-rs] organization has emerged to work on LPC microcontrollers by NXP.

[lpc-rs]: https://github.com/lpc-rs

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd like to mention nrf-rs too! How about this as an addition:

- Also, the [nrf-rs] organization has emerged to focus on the nRF family of microcontrollers by Nordic Semiconductors.

[nrf-rs]: https://github.com/nrf-rs

- Also, the [nrf-rs] organization has emerged to focus on the nRF family of microcontrollers by Nordic Semiconductors.

[nrf-rs]: https://github.com/nrf-rs

- [@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.)

[@adamgreig]: https://github.com/adamgreig
[stm32ral]: https://github.com/adamgreig/stm32ral

- 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).

[book]: https://docs.rust-embedded.org/book/index.html

- 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`).

[rust#58406]: https://github.com/rust-lang/rust/pull/58406

- The Rust compiler also gained [compilation support for x86_64 UEFI][rust#56769] in the form of the `x86_64-unknown-uefi` target.

[rust#56769]: https://github.com/rust-lang/rust/pull/56769

- 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.

[rust#58272]: https://github.com/rust-lang/rust/pull/58272

- The [copterust org][copterust] has [shared a bunch of driver crates][aer#142] for interfacing sensors commonly found in flight controllers (drones).

[copterust]: https://github.com/copterust/
[aer#142]: https://github.com/rust-embedded/awesome-embedded-rust/pull/142

## Embedded Projects

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!

- 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.

[rtfm]: https://crates.io/crates/cortex-m-rtfm
[rtfm#140]: https://github.com/japaric/cortex-m-rtfm/pull/140
[Russian translation]: https://japaric.github.io/cortex-m-rtfm/book/ru/index.html

- [@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.

[@jamwaffles]: https://github.com/jamwaffles

- [@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

[@thejpster]: https://github.com/thejpster
[`embedded-sdmmc`]: https://crates.io/crates/embedded-sdmmc

- [@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.

[@hannobraun]: https://github.com/hannobraun
[`ieee802154`]: https://crates.io/crates/ieee802154
[`dw1000`]: https://crates.io/crates/dw1000

## `embedded-hal` Ecosystem Crates

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:

| Type | Status | Count | Diff |
| :--- | :----- | :---- | :--- |
| [Device Crates] | released | 16 | 0 |
| [HAL Impl Crates] | released | 15 | +2 |
| [Board Support Crates] | released | 13 | +2 |
| [Driver Crates Released] | released | 19 | +3 |
| [Driver Crates WIP] | WIP | 59 | +13 |
| [no-std crates] | released | 23 | +6 |

[Awesome Embedded Rust]: https://github.com/rust-embedded/awesome-embedded-rust
[Weekly Driver Initiative]: https://github.com/rust-embedded/wg/issues/39
[Device Crates]: https://github.com/rust-embedded/awesome-embedded-rust#device-crates
[HAL Impl Crates]: https://github.com/rust-embedded/awesome-embedded-rust#hal-implementation-crates
[Board Support Crates]: https://github.com/rust-embedded/awesome-embedded-rust#board-support-crates
[Driver Crates Released]: https://github.com/rust-embedded/awesome-embedded-rust#driver-crates
[Driver Crates WIP]: https://github.com/rust-embedded/awesome-embedded-rust#wip
[no-std crates]: https://github.com/rust-embedded/awesome-embedded-rust#no-std-crates
65 changes: 65 additions & 0 deletions content/2019-03-06-newsletter-16.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
+++
title = "The Embedded Working Group Newsletter - 16"
date = 2019-03-06
draft = true
in_search_index = false
template = "page.html"
+++

<!-- TODO before release set `draft` to `false` and `in_search_index` to `true` -->

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!

[Embedded WG]: https://github.com/rust-embedded/wg

<!-- TODO uncomment -->

<!-- Discuss on [users.rust-lang.org], [on twitter], or [on reddit]! -->

<!-- [users.rust-lang.org]: https://example.org/#TODO -->
<!-- [on twitter]: https://example.org/#TODO -->
<!-- [on reddit]: https://example.org/#TODO -->

If you want to mention something in [the next newsletter], send us a pull request!

[the next newsletter]: https://github.com/rust-embedded/blog/edit/master/content/2019-03-20-newsletter-17.md

## Highlights

<!-- TODO Add news related to embedded Rust that are not about new crates releases here -->

- TODO(remove, this is an example) "const generics" has landed in nightly!

- TODO(remove, this is an example) the Rust compiler has gained cross compilation support for the Xtensa architecture!

## Embedded Projects

<!-- TODO Add news about embedded projects here -->

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!

## `embedded-hal` Ecosystem Crates

<hr>

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:

<!-- TODO update these numbers before release -->

| Type | Status | Count | Diff |
| :--- | :----- | :---- | :--- |
| [Device Crates] | released | 16 | 0 |
| [HAL Impl Crates] | released | 13 | 0 |
| [Board Support Crates] | released | 11 | 0 |
| [Driver Crates Released] | released | 16 | +1 |
| [Driver Crates WIP] | WIP | 46 | +6 |
| [no-std crates] | released | 17 | +3 |

[Awesome Embedded Rust]: https://github.com/rust-embedded/awesome-embedded-rust
[Weekly Driver Initiative]: https://github.com/rust-embedded/wg/issues/39
[Device Crates]: https://github.com/rust-embedded/awesome-embedded-rust#device-crates
[HAL Impl Crates]: https://github.com/rust-embedded/awesome-embedded-rust#hal-implementation-crates
[Board Support Crates]: https://github.com/rust-embedded/awesome-embedded-rust#board-support-crates
[Driver Crates Released]: https://github.com/rust-embedded/awesome-embedded-rust#driver-crates
[Driver Crates WIP]: https://github.com/rust-embedded/awesome-embedded-rust#wip
[no-std crates]: https://github.com/rust-embedded/awesome-embedded-rust#no-std-crates
65 changes: 65 additions & 0 deletions newsletter-template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
+++
title = "The Embedded Working Group Newsletter - 16"
date = 2019-03-06
draft = true
in_search_index = false
template = "page.html"
+++

<!-- TODO before release set `draft` to `false` and `in_search_index` to `true` -->

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!

[Embedded WG]: https://github.com/rust-embedded/wg

<!-- TODO uncomment -->

<!-- Discuss on [users.rust-lang.org], [on twitter], or [on reddit]! -->

<!-- [users.rust-lang.org]: https://example.org/#TODO -->
<!-- [on twitter]: https://example.org/#TODO -->
<!-- [on reddit]: https://example.org/#TODO -->

If you want to mention something in [the next newsletter], send us a pull request!

[the next newsletter]: https://github.com/rust-embedded/blog/edit/master/content/2019-03-20-newsletter-17.md

## Highlights

<!-- TODO Add news related to embedded Rust that are not about new crates releases here -->

- TODO(remove, this is an example) "const generics" has landed in nightly!

- TODO(remove, this is an example) the Rust compiler has gained cross compilation support for the Xtensa architecture!

## Embedded Projects

<!-- TODO Add news about embedded projects here -->

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!

## `embedded-hal` Ecosystem Crates

<hr>

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:

<!-- TODO update these numbers before release -->

| Type | Status | Count | Diff |
| :--- | :----- | :---- | :--- |
| [Device Crates] | released | 16 | 0 |
| [HAL Impl Crates] | released | 13 | 0 |
| [Board Support Crates] | released | 11 | 0 |
| [Driver Crates Released] | released | 16 | +1 |
| [Driver Crates WIP] | WIP | 46 | +6 |
| [no-std crates] | released | 17 | +3 |

[Awesome Embedded Rust]: https://github.com/rust-embedded/awesome-embedded-rust
[Weekly Driver Initiative]: https://github.com/rust-embedded/wg/issues/39
[Device Crates]: https://github.com/rust-embedded/awesome-embedded-rust#device-crates
[HAL Impl Crates]: https://github.com/rust-embedded/awesome-embedded-rust#hal-implementation-crates
[Board Support Crates]: https://github.com/rust-embedded/awesome-embedded-rust#board-support-crates
[Driver Crates Released]: https://github.com/rust-embedded/awesome-embedded-rust#driver-crates
[Driver Crates WIP]: https://github.com/rust-embedded/awesome-embedded-rust#wip
[no-std crates]: https://github.com/rust-embedded/awesome-embedded-rust#no-std-crates