I have an embedded project that has multiple --target=triple/x86_64-foo.json
JSON files being used to define the different supported architectures. This is required in order to produce a proper target in this case.
Right now there are a number of .cargo/config.toml
aliases to build a specific target, typically looking like this line (just repeated for each of the different subcommands):
kbuild = "build --target triple/x86_64-foo.json -Zbuild-std=core,alloc -Zbuild-std-features=compiler-builtins-mem"
However this doesn't really scale as more triple/whatever.json
's are added to the project, or if I want to cross-compile for all of them in one fell swoop.
This is further hindered by the fact that I would like to automate (via CI) the generation and publication of cargo doc
(which, in this case, is also using a .cargo/config.toml
alias akin to the one above). However, it doesn't seem possible to build one singular documentation payload across all of the targets, at least at first glance. Even a "platform" switcher at the top similar to how docs.rs does it would be highly beneficial.
Is there a way to better utilize cargo for this? Or am I stuck with aliases and individual invocations of cargo doc
per target?