mirror of
https://github.com/zerotier/ZeroTierOne.git
synced 2025-04-26 17:03:43 +02:00
Merge pull request #10 from zerotier/cargo-workspaces
Convert to using cargo workspaces.
This commit is contained in:
commit
f92e4a165f
8 changed files with 24 additions and 40 deletions
2
.github/workflows/main.yaml
vendored
2
.github/workflows/main.yaml
vendored
|
@ -13,4 +13,4 @@ jobs:
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
- run: make test
|
- run: cargo test
|
||||||
|
|
13
Cargo.toml
Normal file
13
Cargo.toml
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
[workspace]
|
||||||
|
|
||||||
|
members = [
|
||||||
|
"zerotier-core-crypto",
|
||||||
|
"zerotier-network-hypervisor",
|
||||||
|
"zerotier-system-service",
|
||||||
|
]
|
||||||
|
|
||||||
|
[profile.release]
|
||||||
|
opt-level = 3
|
||||||
|
lto = true
|
||||||
|
codegen-units = 1
|
||||||
|
panic = 'abort'
|
15
Makefile
15
Makefile
|
@ -1,15 +0,0 @@
|
||||||
all:
|
|
||||||
|
|
||||||
clean: FORCE
|
|
||||||
for i in */Cargo.toml; do cd $$(dirname $$i); cargo clean || exit 1; cd ..; done
|
|
||||||
|
|
||||||
test:
|
|
||||||
for i in */Cargo.toml; do cd $$(dirname $$i); cargo test || exit 1; cd ..; done
|
|
||||||
|
|
||||||
fmt:
|
|
||||||
set extglob; for i in */Cargo.toml; do cd $$(dirname $$i); rustfmt **/*.rs || exit 1; cd ..; done
|
|
||||||
|
|
||||||
|
|
||||||
FORCE:
|
|
||||||
|
|
||||||
.PHONY: test
|
|
|
@ -5,12 +5,6 @@ edition = "2021"
|
||||||
license = "MPL-2.0"
|
license = "MPL-2.0"
|
||||||
authors = ["ZeroTier, Inc. <contact@zerotier.com>", "Adam Ierymenko <adam.ierymenko@zerotier.com>"]
|
authors = ["ZeroTier, Inc. <contact@zerotier.com>", "Adam Ierymenko <adam.ierymenko@zerotier.com>"]
|
||||||
|
|
||||||
[profile.release]
|
|
||||||
opt-level = 3
|
|
||||||
lto = true
|
|
||||||
codegen-units = 1
|
|
||||||
panic = 'abort'
|
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
rand_core = "0.5.0"
|
rand_core = "0.5.0"
|
||||||
aes-gmac-siv = { path = "../aes-gmac-siv" }
|
aes-gmac-siv = { path = "../aes-gmac-siv" }
|
||||||
|
|
|
@ -5,12 +5,6 @@ edition = "2021"
|
||||||
license = "MPL-2.0"
|
license = "MPL-2.0"
|
||||||
authors = ["ZeroTier, Inc. <contact@zerotier.com>", "Adam Ierymenko <adam.ierymenko@zerotier.com>"]
|
authors = ["ZeroTier, Inc. <contact@zerotier.com>", "Adam Ierymenko <adam.ierymenko@zerotier.com>"]
|
||||||
|
|
||||||
[profile.release]
|
|
||||||
lto = true
|
|
||||||
opt-level = 3
|
|
||||||
codegen-units = 1
|
|
||||||
panic = 'abort'
|
|
||||||
|
|
||||||
[features]
|
[features]
|
||||||
default = ["debug_events"]
|
default = ["debug_events"]
|
||||||
debug_events = []
|
debug_events = []
|
||||||
|
|
|
@ -5,12 +5,6 @@ authors = ["ZeroTier, Inc. <contact@zerotier.com>", "Adam Ierymenko <adam.ieryme
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
license = "MPL-2.0"
|
license = "MPL-2.0"
|
||||||
|
|
||||||
[profile.release]
|
|
||||||
opt-level = 3
|
|
||||||
lto = true
|
|
||||||
codegen-units = 1
|
|
||||||
panic = 'abort'
|
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
zerotier-network-hypervisor = { path = "../zerotier-network-hypervisor" }
|
zerotier-network-hypervisor = { path = "../zerotier-network-hypervisor" }
|
||||||
zerotier-core-crypto = { path = "../zerotier-core-crypto" }
|
zerotier-core-crypto = { path = "../zerotier-core-crypto" }
|
||||||
|
|
|
@ -198,7 +198,11 @@ mod tests {
|
||||||
let start = ms_monotonic();
|
let start = ms_monotonic();
|
||||||
std::thread::sleep(Duration::from_millis(500));
|
std::thread::sleep(Duration::from_millis(500));
|
||||||
let end = ms_monotonic();
|
let end = ms_monotonic();
|
||||||
assert!((end - start).abs() > 450);
|
// per docs:
|
||||||
assert!((end - start).abs() < 550);
|
//
|
||||||
|
// The thread may sleep longer than the duration specified due to scheduling specifics or
|
||||||
|
// platform-dependent functionality. It will never sleep less.
|
||||||
|
//
|
||||||
|
assert!((end - start).abs() >= 500);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue