By reintroducing a mnemos-d1-core crate, we can put most of the platform implementation in a crate without a forced-target, allowing us to run unit tests for the platform impl on the build host. The actual dependencies on riscv and riscv-rt, which won't build for the host's target, are now cfg-gated. We must still have the crate containing the top-level binaries have a forced-target, or else we hit weird cargo bugs I don't understand, but it's now a thin wrapper around the core crate which has a forced-target and defines the board binaries.
This also has the side benefit of letting us put the d1-core crate in the workspace's default-members, so it gets seen by cargo test/cargo fmt/etc without having to pass it explicitly. And, we can have tests now!
By reintroducing a
mnemos-d1-core
crate, we can put most of the platform implementation in a crate without aforced-target
, allowing us to run unit tests for the platform impl on the build host. The actual dependencies onriscv
andriscv-rt
, which won't build for the host's target, are nowcfg
-gated. We must still have the crate containing the top-level binaries have aforced-target
, or else we hit weird cargo bugs I don't understand, but it's now a thin wrapper around thecore
crate which has aforced-target
and defines the board binaries.This also has the side benefit of letting us put the
d1-core
crate in the workspace'sdefault-members
, so it gets seen bycargo test
/cargo fmt
/etc without having to pass it explicitly. And, we can have tests now!