Use default-members in Cargo workspace
Adds bpf code to the workspace and is excluded by default. This allows for all deps to be managed in Cargo.lock and for cargo update to work as expected from the root. Similarly, rustfmt and clippy can operate on the whole workspace. Signed-off-by: Dave Tucker <dave@dtucker.co.uk>pull/58/head
parent
37410be032
commit
098879eb1c
@ -1,2 +1,30 @@
|
||||
[alias]
|
||||
xtask = "run --package xtask --"
|
||||
|
||||
# this should migrate to cargo per-target profiles when it is implemented
|
||||
|
||||
[target.bpfel-unknown-none]
|
||||
rustflags = [
|
||||
"-C", "panic=abort",
|
||||
"-C", "lto=yes",
|
||||
"-C", "embed-bitcode=yes",
|
||||
"-C", "debuginfo=2",
|
||||
"-C", "opt-level=3",
|
||||
"-C", "codegen-units=1",
|
||||
"-C", "debug-assertions=no",
|
||||
"-C", "overflow-checks=no",
|
||||
"-C", "incremental=no",
|
||||
]
|
||||
|
||||
[target.bpfeb-unknown-none]
|
||||
rustflags = [
|
||||
"-C", "panic=abort",
|
||||
"-C", "lto=yes",
|
||||
"-C", "embed-bitcode=yes",
|
||||
"-C", "debuginfo=2",
|
||||
"-C", "opt-level=3",
|
||||
"-C", "codegen-units=1",
|
||||
"-C", "debug-assertions=no",
|
||||
"-C", "overflow-checks=no",
|
||||
"-C", "incremental=no",
|
||||
]
|
@ -1,3 +1,4 @@
|
||||
{
|
||||
"rust-analyzer.linkedProjects": ["Cargo.toml", "{{project-name}}-ebpf/Cargo.toml"]
|
||||
"rust-analyzer.checkOnSave.allTargets": false,
|
||||
"rust-analyzer.checkOnSave.command": "clippy"
|
||||
}
|
||||
|
@ -1,3 +1,4 @@
|
||||
{
|
||||
"rust-analyzer.linkedProjects": ["Cargo.toml", "{{project-name}}-ebpf/Cargo.toml"]
|
||||
"rust-analyzer.checkOnSave.allTargets": false,
|
||||
"rust-analyzer.checkOnSave.command": "clippy"
|
||||
}
|
||||
|
@ -1,2 +1,3 @@
|
||||
[workspace]
|
||||
members = ["{{project-name}}", "{{project-name}}-common", "xtask"]
|
||||
members = ["{{project-name}}", "{{project-name}}-ebpf", "{{project-name}}-common", "xtask"]
|
||||
default-members = ["{{project-name}}", "{{project-name}}-common", "xtask"]
|
||||
|
Loading…
Reference in New Issue