This simple crate tests that jwt-compact
builds and can be used
in a no_std
environment (namely, an ARM Cortex-M3 microcontroller).
It requires a nightly toolchain. The release
profile must be used
to not overflow the available microcontroller flash memory.
Beside using a real microcontroller, the crate can be tested with qemu.
In fact, Cargo is configured to run qemu when using cargo run
.
- Install a recent nightly Rust toolchain and the
thumbv7m-none-eabi
target for it. - Install qemu. In Linux, qemu is often included as a system package, so
this step can be as simple as
sudo apt-get install qemu-system-arm
. - Compile and run the app on qemu using
cd $crate_dir && cargo run --release
, where$crate_dir
is the directory containing this README. Switching to the crate directory is necessary to use the Cargo config, which sets up necessaryrustc
flags and the qemu wrapper forcargo run
.
By default, the binary only tests the HS*
algorithms. You may run the binary
with --features ed25519
or --features rsa
in order to test additional algorithms.