Open mamins1376 opened 1 month ago
why having per package targets does make sense, in general?
why having per package targets does make sense, in general?
In my workspace, there is one package for the ARM firmware, and one package for host app which communicates with the hardware running that firmware, plus one other shared crates for protocol description.
This kind of situation is common in embedded and/or microcontroller projects.
Problem
Using
per-package-target
without an explicit--target
results in configuration specified in.cargo/config.toml
keys relevant to the current compilation target being ignored, while specifying the same target explicitly would respect configuration.Since I discovered this during development of an embedded arm project, I am using the same target (
thumbv7em-none-eabihf
) here, but I doubt that it matters.Cargo.toml
:.cargo/config.toml
:Implicitly:
Explicitly:
Steps
cd
and compare runningcargo run
with and without--target ...
.Possible Solution(s)
No response
Notes
No response
Version