Reactive Rocket on AWS Lambda and Async Bluetooth on the BBC micro:bit Microcontroller
Topics:
- Reactive Rocket on AWS Lambda via @mysteriouspants
- Async Bluetooth on the BBC micro:bit Microcontroller via @jacobrosenthal
Reactive Rocket on AWS Lambda via @mysteriouspants
Repo: https://github.com/mysteriouspants/rocket-on-lambdas-starter-template
Blog Post: https://www.mysteriouspants.com/2021/07/21/reactive-rocket-on-lambda.html
Chris showed everyone how to write a lambda in Rust and deploy it to AWS. He wrote an excellent blog post describing the process in detail. The project uses the AWS Lambda Runtime and the lambda-web crate, which adapts requests from API Gateway V2 passed through the Lambda runtime to Rocket. Actix and Warp are also supported Rust web frameworks.
Async Bluetooth on the BBC micro:bit Microcontroller via @jacobrosenthal
Repo: https://github.com/jacobrosenthal/microbitv2-rs
Jacob wrote an example async Bluetooth LE program for the BBC micro:bit microcontroller.
The project makes use of the following crates:
- embassy for using async / await in an embedded no-std context
- probe-run for flashing the program to the microcontroller
- probe-rs for displaying logs from the microcontroller's onboard debugger.
- flip-link which protects against overflowing the stack region of data into the
.bss + .data
region by putting the stack region below the.bss + .data
memory region.
The program allows us to read and write data to a dummy BLE characteristic, which we did using the nRF Connect app (available for Desktop, Android, and iOS).
Some additional reading materials:
-
Make: Bluetooth by Sandeep Mistry, Alasdair Allan, and Don Coleman: an awesome book on making Bluetooth programs
-
Rust on the BBC micro:bit: a blog post for writing Rust programs for the BBC micro:bit
-
nrf-rs/microbit: another example repo of running a Rust program on the BBC micro:bit from the nRF Rust collection of Rust repos for the nRF series of microcontrollers.
Crates You Should Know
- probe-rs: A collection of on chip debugging tools to communicate with microchips.
- probe-run: Runs embedded programs just like native ones
- flip-link: Flips the memory layout of embedded programs to protect against stack overflows
- lambda_runtime: AWS Lambda Runtime
- lambda-web: Run Rust web frameworks on AWS Lambda