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

Rewrite: Remove support for bootimage {run, test} #55

merged 30 commits into from May 7, 2020


Copy link

@phil-opp phil-opp commented May 7, 2020

This pull request rewrites the bootimage crate almost completely. The most notable changes are:

  • Breaking: Removes support for the old bootimage run and bootimage test commands because they were difficult to maintain.
  • Breaking: Removes support for the default-target config key because it did not play nice with cargo workspaces.
  • Breaking: The crate structure was changed completely, so users who use bootimage as a library will need to update their code when updating to the new (semver-incompatible) API.
  • Rewrite the code for finding the kernel Cargo.toml file to make bootimage work with cargo workspaces.
  • Switches error handling to the anyhow/thiserror crates.
  • Updates some dependencies.


Users of bootimage run should switch to the runner-based API provided by the bootimage runner sucommand as described here. Instead of bootimage test, custom test frameworks should be used together with cargo xtest. Instead of using the default-target config key, setting a default target is possible through a key in a .cargo/config file.

Fixes #54

phil-opp added 30 commits May 6, 2020
We only support running/testing through the runner executable from now on.
Set a default target in a `.cargo/config` file instead.
Move kernel package location code into a new public function.
The `cargo bootimage` command only deals with binaries, so we don't need to try to derive the manifest path for test or doctest executables.
For doctests it's not possible to derive the manifest path from the executable path and the cargo metadata since doctests live under temp and all use the same name ('rust-out'). Fortunately, cargo sets a `CARGO_MANIFEST_DIR` environment variable for runner executables that points to the manifest path of the executable (which can be different from the root manifest path for workpace projects.)
@phil-opp phil-opp merged commit df0ea1f into master May 7, 2020
5 checks passed
@bors bors bot deleted the rewrite branch May 7, 2020
phil-opp added a commit that referenced this pull request May 7, 2020
Copy link
Member Author

phil-opp commented May 7, 2020

Published as version 0.8.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
None yet

Successfully merging this pull request may close these issues.

Error thrown when using Workspace project
1 participant