-
Notifications
You must be signed in to change notification settings - Fork 205
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
Using [package.metadata] in each crate instead of maintaining a Crates.json file #503
Comments
maybe just a single [package.metadata.atsamd_metadata]
#crate_type = BSP | PAC | HAL
crate_type = BSP
tier = 2 # only applicable for
build_invocation = "cargo build --examples --features=unproven,usb" |
This makes perfect sense to me! |
related #481 |
Proposal spec: Adding a new BSP/PACThe build and release workflows will automatically recognize any new crate added to the repo, # example of metadata for a BSP
[package.metadata.atsamd]
# also_build (optional): indicate if any additional crates (HAL | PAC | BSP's) should be built
# to properly test this crate
# also_build = ["boards/some_bsp", "pac/some_pac"]
# room for other generic high-level hooks for pipeline/build customization
[package.metadata.atsamd.bsp]
# tier (required)
# see: https://github.com/atsamd-rs/atsamd#how-to-use-a-bsp-ie-getting-started-writing-your-own-code
# for determining what tier your BSP is
tier = 2
# build_command (required)
# used to invoke the appropriate build command for the bsp
build_command = "cargo build --examples --features=unproven"
[package.metadata.atsamd.pac]
# target (required): the build target, used to configure the runner properly
target = "thumbv6m-none-eabi"
# features to build the pac with
features = ["samd21g", "unproven", "usb"] |
Please update the wiki pages related to adding new boards/pacs. |
This is also in a new |
what do you guys think of using the
[package.metadata.tier]
format in theCargo.toml
so we can get rid of having to maintain aCrates.json
file?It would make things much simpler, especially as we move into auto-generating
CHANGELOG
and even auto-updatingREADME
with list of tiered crateslikewise for
[package.metadata.build_invocation]
each crate would add those two metadata fields, and specify their tier and build invocation, and then I can use that in the build matrix to modify the README accordingly as well as invoke any build instructions
https://doc.rust-lang.org/cargo/reference/manifest.html#the-metadata-table
This would also easily allow the build stage to check to ensure any new crates have the appropriate information required in the Cargo file, enabling us to dynamically add crates (especially BSP's) very easily.
The text was updated successfully, but these errors were encountered: