Skip to content
an effort to develop a testing solution for rust on deeply embedded, bare metal targets
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
doc
.gitignore
LICENSE
Readme.md

Readme.md

utest-rs

The goal of this repository is to develop a solution for running standard rust unit tests on deeply embedded, bare metal targets.

See also this issue.

How can I collaborate?

Feel free to open issues and send in pull requests.

Goals

  • to develop a flexible testing harness and test runner that can be adjusted for different micro controller setups
  • work out what needs to be change in rustc/cargo in order to integrate this with the regular rust workflow

Constraints on Deeply Embedded, Bare Metal Targets

  • only libcore available
  • only stack no heap memory allocation
  • restricted code size (common flash sizes are 128kB)
  • no support for stack unwinding, thus no panic
  • because of size constraints, stack unwinding might never be feasible
  • heap allocation is not too hard to make work, it would just make this more universal, if we did not require it

Test Harness

  • does not allocate dynamic memory
  • does not use panic
  • returns compact error descriptions (maybe error numbers)
  • makes it possible to split up tests into several binaries because one monolithic binary for all tests might not fit into program memory
  • there might be a component running on the host pc, that loads the tests onto the micro controller and collects test results e.g. via USB
You can’t perform that action at this time.