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

refac(D1): pull most of the code back into a core crate #283

Merged
merged 6 commits into from
Sep 17, 2023

Conversation

hawkw
Copy link
Contributor

@hawkw hawkw commented Sep 17, 2023

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!

@hawkw hawkw requested a review from jamesmunns September 17, 2023 18:39
@hawkw hawkw marked this pull request as ready for review September 17, 2023 18:39
@hawkw hawkw enabled auto-merge (squash) September 17, 2023 18:44
@hawkw hawkw merged commit f96c103 into main Sep 17, 2023
10 checks passed
@hawkw hawkw deleted the eliza/put-back-d1-tests branch September 17, 2023 18:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant