-
-
Notifications
You must be signed in to change notification settings - Fork 27
Expand file tree
/
Copy pathMakefile
More file actions
94 lines (79 loc) · 3.59 KB
/
Copy pathMakefile
File metadata and controls
94 lines (79 loc) · 3.59 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
# Makefile for Rust project using Cargo
# Kept in sync with Justfile (same targets / same check suite).
.PHONY: all build check check-no-std run test bench clippy clippy-fix fmt doc update deny list
# Default: run the standard local check suite (includes tests; mirrors CI).
all: fmt clippy-fix check-no-std deny test
# List targets (parity with `just list`)
list:
@echo "Available targets: all build check check-no-std run test bench clippy clippy-fix fmt doc update deny list"
# Build the project with all features enabled in release mode
build:
cargo build --workspace --release --all-features
# Check the project for compilation errors without producing binaries
check:
cargo check --workspace --all-features
# Verify no_std compilation (all crates use #![cfg_attr(not(feature = "std"), no_std)])
# CI uses thumbv7m-none-eabi for strict bare-metal verification
check-no-std:
cargo check -p kobe-primitives --no-default-features
cargo check -p kobe-primitives --no-default-features --features alloc
cargo check -p kobe-primitives --no-default-features --features "alloc,bip32,slip10,camouflage,encoding"
cargo check -p kobe-aptos --no-default-features --features alloc
cargo check -p kobe-btc --no-default-features --features alloc
cargo check -p kobe-evm --no-default-features --features alloc
cargo check -p kobe-svm --no-default-features --features alloc
cargo check -p kobe-cosmos --no-default-features --features alloc
cargo check -p kobe-tron --no-default-features --features alloc
cargo check -p kobe-spark --no-default-features --features alloc
cargo check -p kobe-fil --no-default-features --features alloc
cargo check -p kobe-ton --no-default-features --features alloc
cargo check -p kobe-sui --no-default-features --features alloc
cargo check -p kobe-nostr --no-default-features --features alloc
cargo check -p kobe-xrpl --no-default-features --features alloc
cargo check -p kobe-casper --no-default-features --features alloc
cargo check -p kobe-arweave --no-default-features --features alloc
cargo check -p kobe --no-default-features --features alloc
cargo check -p kobe --no-default-features --features "alloc,all-chains"
# Update dependencies to their latest compatible versions
update:
cargo update
# Run the project with all features enabled in release mode
run:
cargo run --release --all-features
# Run all tests with all features enabled
test:
cargo test --workspace --all-features
# Run benchmarks with all features enabled
bench:
cargo bench --all-features
# Run Clippy linter (nightly is only required for a few unstable lints).
# Uses workspace lints from Cargo.toml. Falls back to stable cleanly.
# Prerequisites: `rustup toolchain install nightly --component clippy`
clippy:
cargo +nightly clippy --workspace \
--all-targets \
--all-features \
-- -D warnings
# Run Clippy linter with auto-fix (for development).
# Prerequisites: `rustup toolchain install nightly --component clippy`
clippy-fix:
cargo +nightly clippy --workspace \
--fix \
--all-targets \
--all-features \
--allow-dirty \
--allow-staged \
-- -D warnings
# Format the code using rustfmt (nightly provides import grouping).
# Prerequisites: `rustup toolchain install nightly --component rustfmt`
fmt:
cargo +nightly fmt --all -- \
--config unstable_features=true,group_imports=StdExternalCrate,imports_granularity=Module
# Generate documentation for all crates and open it in the browser.
# Prerequisites: `rustup toolchain install nightly`
doc:
cargo +nightly doc --all-features --no-deps --open
# Dependency policy (licenses, bans, advisories, sources).
# Prerequisites: `cargo install cargo-deny`
deny:
cargo deny check