forked from canonical/snapcraft
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
rust plugin: support projects with workspaces
Unfortunately, `cargo install` does not support workspaces yet: rust-lang/cargo#7599 Alternatively, we use `cargo build`, which will respect the Cargo.lock configuration. It however, does require a bit more hoop jumping to determine which binaries were built and install them. Introudce _install_workspace_artifacts() to install the built executables into the correct paths. Testing has covered executables and libraries, though dynamic linking is not quite yet supported by the rust plugin (at least in my testing, it will have unmnet dependencies on libstd-<id>.so). We can address that feature gap in the future, but likely doesn't affect snap users because they are probably using the standard linking process which doesn't require libstd (likely due to static linking of those dependencies). `cargo build` has an unstable flag option for `--out-dir` which may simplifiy the install process, but is currently unavailable for stable use: https://doc.rust-lang.org/cargo/reference/unstable.html#out-dir Add/update tests for coverage. Signed-off-by: Chris Patterson <[email protected]>
- Loading branch information
Chris Patterson
committed
Dec 13, 2019
1 parent
2252dd7
commit 8d3fac0
Showing
2 changed files
with
120 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters