-
Notifications
You must be signed in to change notification settings - Fork 19
Expand file tree
/
Copy pathMakefile
More file actions
497 lines (435 loc) · 20.2 KB
/
Copy pathMakefile
File metadata and controls
497 lines (435 loc) · 20.2 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
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
# -----------------------------------------------------------------------------
# Workspace Makefile
# -----------------------------------------------------------------------------
#
# This repository contains multiple Rust crates with feature-gated surfaces.
# This Makefile is designed to be:
# - developer-friendly (simple, predictable targets)
# - CI-oriented (explicit feature lanes, integration, MSRV, coverage)
#
# Quick map:
# - Development: fmt-check | lint | build | test | check | all
# - CI: per-crate full lane sweeps, integration, msrv, audit, deny
# - SPIRE tests: integration-tests (ignored tests requiring SPIRE)
# - Docs: doc-test (catch example drift early)
# - Examples: examples (compile example binaries)
# - Coverage: coverage (llvm-cov → lcov.info)
#
# Notes:
# - `spiffe` has no default features; dev/test targets exercise meaningful
# feature sets instead of relying on defaults.
# - Feature lanes are expressed as comma-separated feature lists (no spaces),
# allowing safe iteration in shell loops.
# -----------------------------------------------------------------------------
CARGO ?= cargo
SHELL := /bin/bash
-include make/fuzz.mk
MSRV ?= 1.88.0
SPIFFE_MANIFEST := spiffe/Cargo.toml
SPIFFE_RUSTLS_MANIFEST := spiffe-rustls/Cargo.toml
SPIFFE_RUSTLS_TOKIO_MANIFEST := spiffe-rustls-tokio/Cargo.toml
SPIRE_API_MANIFEST := spire-api/Cargo.toml
# -----------------------------------------------------------------------------
# Feature lane sentinel
# -----------------------------------------------------------------------------
# Use a sentinel to represent "default features" lanes in shell loops.
DEFAULT_LANE := @default
# -----------------------------------------------------------------------------
# Target catalog
# -----------------------------------------------------------------------------
.PHONY: \
help clean \
fmt fmt-check \
lint build test check all \
doc-test \
ci \
integration-tests \
coverage \
msrv \
examples \
audit deny \
lanes \
spiffe spire-api spiffe-rustls spiffe-rustls-tokio \
spiffe-all-lanes rustls-all-lanes rustls-tokio-all-lanes \
spiffe-ci-test spire-api-ci-test spiffe-rustls-ci-test spiffe-rustls-tokio-ci-test
help:
@echo "Common targets:"
@echo " make fmt Format code"
@echo " make fmt-check Check formatting"
@echo " make lint Clippy (-D warnings)"
@echo " make build Build"
@echo " make test Test (meaningful dev lanes)"
@echo " make check fmt-check + lint + build"
@echo " make all check + test + doc-test + examples"
@echo " make clean cargo clean"
@echo ""
@echo "Docs / examples:"
@echo " make doc-test Run doctests explicitly"
@echo " make examples Build examples"
@echo ""
@echo "CI targets:"
@echo " make ci Full validation suite (all lanes + integration + msrv + audit)"
@echo ""
@echo "Per-crate (full lane sweeps):"
@echo " make spiffe"
@echo " make spiffe-rustls"
@echo " make spiffe-rustls-tokio"
@echo " make spire-api"
@echo ""
@echo "CI test targets (reduced lanes, no clippy/build):"
@echo " make spiffe-ci-test"
@echo " make spiffe-rustls-ci-test"
@echo " make spiffe-rustls-tokio-ci-test"
@echo " make spire-api-ci-test"
@echo ""
@echo "Other:"
@echo " make integration-tests Run ignored tests requiring SPIRE"
@echo " make coverage Generate combined LCOV at ./lcov.info"
@echo " make msrv MSRV policy checks (representative lanes)"
@echo " make audit | deny Dependency checks"
@echo " make fuzz Fuzz targets (see make/fuzz.mk)"
@echo " make lanes Print lane definitions"
clean:
$(CARGO) clean
fmt:
$(CARGO) fmt
fmt-check:
$(CARGO) fmt --check
# -----------------------------------------------------------------------------
# Feature lanes (comma-separated feature sets; no spaces)
# -----------------------------------------------------------------------------
# spiffe: dev lanes should be meaningful (spiffe has no default features).
SPIFFE_DEV_FEATURES := \
x509-source,jwt-source,jwt,jwt-verify-rust-crypto,tracing
RUSTLS_DEV_FEATURES := \
$(DEFAULT_LANE) \
aws-lc-rs
SPIRE_API_DEV_FEATURES := \
$(DEFAULT_LANE)
RUSTLS_TOKIO_DEV_FEATURES := \
$(DEFAULT_LANE)
# Full matrix lanes (main CI + coverage).
SPIFFE_ALL_FEATURES := \
x509 \
transport \
transport-grpc \
workload-api-core \
workload-api-x509 \
workload-api-jwt \
workload-api \
x509-source \
jwt-source \
jwt \
jwt-verify-rust-crypto \
jwt-verify-aws-lc-rs \
logging \
tracing \
workload-api,logging \
workload-api,tracing \
workload-api,tracing,jwt-verify-rust-crypto \
workload-api,tracing,jwt-verify-aws-lc-rs \
x509-source,logging \
x509-source,tracing \
jwt-source,logging \
jwt-source,tracing
RUSTLS_ALL_FEATURES := \
$(DEFAULT_LANE) \
aws-lc-rs \
ring,tracing \
ring,logging,parking-lot
SPIRE_API_ALL_FEATURES := \
$(DEFAULT_LANE)
RUSTLS_TOKIO_ALL_FEATURES := \
$(DEFAULT_LANE)
# CI feature lanes (representative subset — covers every feature boundary
# without redundant subsets already implied by the feature DAG).
# Clippy runs in the lint job; these lanes are test + doctests only.
SPIFFE_CI_FEATURES := \
x509 \
jwt \
jwt-verify-rust-crypto \
jwt-verify-aws-lc-rs \
x509-source,jwt-source,jwt-verify-rust-crypto,tracing \
x509-source,jwt-source,jwt-verify-aws-lc-rs,logging
RUSTLS_CI_FEATURES := $(RUSTLS_ALL_FEATURES)
SPIRE_API_CI_FEATURES := $(SPIRE_API_ALL_FEATURES)
RUSTLS_TOKIO_CI_FEATURES := $(RUSTLS_TOKIO_ALL_FEATURES)
# SPIRE-backed Workload API integration lane for the spiffe crate.
SPIFFE_WORKLOAD_API_INTEGRATION_FEATURES := x509-source,jwt-source,jwt,workload-api
# -----------------------------------------------------------------------------
# Runner helpers
# -----------------------------------------------------------------------------
#
# Iterate feature sets and construct cargo flags safely.
#
# $(call _run_feature_lanes,<manifest>,<label>,<cmd>,<features_list>)
define _run_feature_lanes
@set -euo pipefail; \
manifest="$(1)"; \
label="$(2)"; \
cmd="$(3)"; \
features_list='$(4)'; \
echo "==> $$label"; \
for feat in $$features_list; do \
extra=""; \
if [ "$$feat" = "$(DEFAULT_LANE)" ]; then \
echo "---- lane: default"; \
else \
echo "---- lane: --no-default-features --features $$feat"; \
extra="--no-default-features --features $$feat"; \
fi; \
case "$$cmd" in \
clippy) $(CARGO) clippy --manifest-path $$manifest --all-targets $$extra -- -D warnings ;; \
build) $(CARGO) build --manifest-path $$manifest $$extra ;; \
test) $(CARGO) test --manifest-path $$manifest --all-targets $$extra ;; \
doc) $(CARGO) test --manifest-path $$manifest --doc $$extra ;; \
*) echo "unknown cmd: $$cmd" >&2; exit 2 ;; \
esac; \
done
endef
# MSRV helpers (keep policy lanes consistent and readable).
define _msrv_test
cargo +$(MSRV) test --manifest-path $(1) --all-targets $(2)
endef
define _msrv_doc
cargo +$(MSRV) test --manifest-path $(1) --doc $(2)
endef
define _assert_spiffe_workload_api_test_discovery
@set -euo pipefail; \
echo "==> Verify spiffe workload_api_client test discovery"; \
list_output="$$( \
$(CARGO) test --manifest-path $(SPIFFE_MANIFEST) --no-default-features \
--features $(SPIFFE_WORKLOAD_API_INTEGRATION_FEATURES) \
--test workload_api_client -- --list \
)"; \
printf '%s\n' "$$list_output"; \
test_count="$$(printf '%s\n' "$$list_output" | awk '/: test$$/{count++} END{print count+0}')"; \
if [ "$$test_count" -eq 0 ]; then \
echo "Error: expected workload_api_client integration tests for features $(SPIFFE_WORKLOAD_API_INTEGRATION_FEATURES)" >&2; \
exit 1; \
fi
endef
define _assert_spiffe_workload_api_available
@set -euo pipefail; \
echo "==> Verify SPIFFE Workload API availability"; \
if ! $(CARGO) test --manifest-path $(SPIFFE_MANIFEST) --no-default-features \
--features $(SPIFFE_WORKLOAD_API_INTEGRATION_FEATURES) \
--test workload_api_client \
integration_tests_workload_api_client::fetch_x509_svid -- --ignored --exact; then \
echo "Error: SPIFFE Workload API preflight failed; verify SPIFFE_ENDPOINT_SOCKET and SPIRE workload registration" >&2; \
exit 1; \
fi
endef
check: fmt-check lint build
all: check test doc-test examples
lint: fmt-check
$(call _run_feature_lanes,$(SPIFFE_MANIFEST),spiffe: clippy (dev lanes),clippy,$(SPIFFE_DEV_FEATURES))
$(call _run_feature_lanes,$(SPIRE_API_MANIFEST),spire-api: clippy (dev lanes),clippy,$(SPIRE_API_DEV_FEATURES))
$(call _run_feature_lanes,$(SPIFFE_RUSTLS_MANIFEST),spiffe-rustls: clippy (dev lanes),clippy,$(RUSTLS_DEV_FEATURES))
$(call _run_feature_lanes,$(SPIFFE_RUSTLS_TOKIO_MANIFEST),spiffe-rustls-tokio: clippy (dev lanes),clippy,$(RUSTLS_TOKIO_DEV_FEATURES))
build:
$(call _run_feature_lanes,$(SPIFFE_MANIFEST),spiffe: build (dev lanes),build,$(SPIFFE_DEV_FEATURES))
$(call _run_feature_lanes,$(SPIRE_API_MANIFEST),spire-api: build (dev lanes),build,$(SPIRE_API_DEV_FEATURES))
$(call _run_feature_lanes,$(SPIFFE_RUSTLS_MANIFEST),spiffe-rustls: build (dev lanes),build,$(RUSTLS_DEV_FEATURES))
$(call _run_feature_lanes,$(SPIFFE_RUSTLS_TOKIO_MANIFEST),spiffe-rustls-tokio: build (dev lanes),build,$(RUSTLS_TOKIO_DEV_FEATURES))
test:
$(call _run_feature_lanes,$(SPIFFE_MANIFEST),spiffe: test (dev lanes),test,$(SPIFFE_DEV_FEATURES))
$(call _run_feature_lanes,$(SPIRE_API_MANIFEST),spire-api: test (dev lanes),test,$(SPIRE_API_DEV_FEATURES))
$(call _run_feature_lanes,$(SPIFFE_RUSTLS_MANIFEST),spiffe-rustls: test (dev lanes),test,$(RUSTLS_DEV_FEATURES))
$(call _run_feature_lanes,$(SPIFFE_RUSTLS_TOKIO_MANIFEST),spiffe-rustls-tokio: test (dev lanes),test,$(RUSTLS_TOKIO_DEV_FEATURES))
doc-test:
$(call _run_feature_lanes,$(SPIFFE_MANIFEST),spiffe: doctests (dev lane),doc,$(SPIFFE_DEV_FEATURES))
$(call _run_feature_lanes,$(SPIRE_API_MANIFEST),spire-api: doctests,doc,$(SPIRE_API_DEV_FEATURES))
$(call _run_feature_lanes,$(SPIFFE_RUSTLS_MANIFEST),spiffe-rustls: doctests,doc,$(RUSTLS_DEV_FEATURES))
$(call _run_feature_lanes,$(SPIFFE_RUSTLS_TOKIO_MANIFEST),spiffe-rustls-tokio: doctests,doc,$(RUSTLS_TOKIO_DEV_FEATURES))
# -----------------------------------------------------------------------------
# Local validation targets
# -----------------------------------------------------------------------------
ci: fmt-check lint spiffe spire-api spiffe-rustls spiffe-rustls-tokio integration-tests msrv audit deny
# -----------------------------------------------------------------------------
# Per-crate targets (full lane sweeps)
# -----------------------------------------------------------------------------
spiffe: spiffe-all-lanes
spiffe-all-lanes:
$(call _run_feature_lanes,$(SPIFFE_MANIFEST),spiffe: clippy (all lanes),clippy,$(SPIFFE_ALL_FEATURES))
$(call _run_feature_lanes,$(SPIFFE_MANIFEST),spiffe: build (all lanes),build,$(SPIFFE_ALL_FEATURES))
$(call _run_feature_lanes,$(SPIFFE_MANIFEST),spiffe: test (all lanes),test,$(SPIFFE_ALL_FEATURES))
$(call _run_feature_lanes,$(SPIFFE_MANIFEST),spiffe: doctests (all lanes),doc,$(SPIFFE_ALL_FEATURES))
spire-api:
$(call _run_feature_lanes,$(SPIRE_API_MANIFEST),spire-api: clippy,clippy,$(SPIRE_API_ALL_FEATURES))
$(call _run_feature_lanes,$(SPIRE_API_MANIFEST),spire-api: build,build,$(SPIRE_API_ALL_FEATURES))
$(call _run_feature_lanes,$(SPIRE_API_MANIFEST),spire-api: test,test,$(SPIRE_API_ALL_FEATURES))
$(call _run_feature_lanes,$(SPIRE_API_MANIFEST),spire-api: doctests,doc,$(SPIRE_API_ALL_FEATURES))
spiffe-rustls: rustls-all-lanes
rustls-all-lanes:
$(call _run_feature_lanes,$(SPIFFE_RUSTLS_MANIFEST),spiffe-rustls: clippy (all lanes),clippy,$(RUSTLS_ALL_FEATURES))
$(call _run_feature_lanes,$(SPIFFE_RUSTLS_MANIFEST),spiffe-rustls: build (all lanes),build,$(RUSTLS_ALL_FEATURES))
$(call _run_feature_lanes,$(SPIFFE_RUSTLS_MANIFEST),spiffe-rustls: test (all lanes),test,$(RUSTLS_ALL_FEATURES))
$(call _run_feature_lanes,$(SPIFFE_RUSTLS_MANIFEST),spiffe-rustls: doctests (all lanes),doc,$(RUSTLS_ALL_FEATURES))
spiffe-rustls-tokio: rustls-tokio-all-lanes
rustls-tokio-all-lanes:
$(call _run_feature_lanes,$(SPIFFE_RUSTLS_TOKIO_MANIFEST),spiffe-rustls-tokio: clippy (all lanes),clippy,$(RUSTLS_TOKIO_ALL_FEATURES))
$(call _run_feature_lanes,$(SPIFFE_RUSTLS_TOKIO_MANIFEST),spiffe-rustls-tokio: build (all lanes),build,$(RUSTLS_TOKIO_ALL_FEATURES))
$(call _run_feature_lanes,$(SPIFFE_RUSTLS_TOKIO_MANIFEST),spiffe-rustls-tokio: test (all lanes),test,$(RUSTLS_TOKIO_ALL_FEATURES))
$(call _run_feature_lanes,$(SPIFFE_RUSTLS_TOKIO_MANIFEST),spiffe-rustls-tokio: doctests (all lanes),doc,$(RUSTLS_TOKIO_ALL_FEATURES))
# -----------------------------------------------------------------------------
# Per-crate CI targets (test + doctests only; clippy runs in the lint job)
# -----------------------------------------------------------------------------
# These use reduced, representative feature lanes and skip clippy/build
spiffe-ci-test:
$(call _run_feature_lanes,$(SPIFFE_MANIFEST),spiffe: test (CI lanes),test,$(SPIFFE_CI_FEATURES))
$(call _run_feature_lanes,$(SPIFFE_MANIFEST),spiffe: doctests (CI lanes),doc,$(SPIFFE_CI_FEATURES))
spire-api-ci-test:
$(call _run_feature_lanes,$(SPIRE_API_MANIFEST),spire-api: test,test,$(SPIRE_API_CI_FEATURES))
$(call _run_feature_lanes,$(SPIRE_API_MANIFEST),spire-api: doctests,doc,$(SPIRE_API_CI_FEATURES))
spiffe-rustls-ci-test:
$(call _run_feature_lanes,$(SPIFFE_RUSTLS_MANIFEST),spiffe-rustls: test (CI lanes),test,$(RUSTLS_CI_FEATURES))
$(call _run_feature_lanes,$(SPIFFE_RUSTLS_MANIFEST),spiffe-rustls: doctests (CI lanes),doc,$(RUSTLS_CI_FEATURES))
spiffe-rustls-tokio-ci-test:
$(call _run_feature_lanes,$(SPIFFE_RUSTLS_TOKIO_MANIFEST),spiffe-rustls-tokio: test,test,$(RUSTLS_TOKIO_CI_FEATURES))
$(call _run_feature_lanes,$(SPIFFE_RUSTLS_TOKIO_MANIFEST),spiffe-rustls-tokio: doctests,doc,$(RUSTLS_TOKIO_CI_FEATURES))
# -----------------------------------------------------------------------------
# Integration tests (SPIRE)
# -----------------------------------------------------------------------------
integration-tests:
$(info ==> Run integration tests (ignored))
$(call _assert_spiffe_workload_api_test_discovery)
$(call _assert_spiffe_workload_api_available)
@set -euo pipefail; \
$(CARGO) test --manifest-path $(SPIFFE_MANIFEST) --no-default-features --features $(SPIFFE_WORKLOAD_API_INTEGRATION_FEATURES) -- --ignored; \
$(CARGO) test --manifest-path $(SPIFFE_RUSTLS_MANIFEST) -- --ignored; \
$(CARGO) test --manifest-path $(SPIFFE_RUSTLS_TOKIO_MANIFEST) -- --ignored; \
$(CARGO) test --manifest-path $(SPIRE_API_MANIFEST) -- --ignored
# -----------------------------------------------------------------------------
# Coverage (cargo llvm-cov)
# -----------------------------------------------------------------------------
# Coverage focuses on unit + integration paths and emits a combined LCOV file.
coverage:
$(info ==> Coverage: unit + integration across feature lanes -> lcov.info)
$(CARGO) llvm-cov clean --workspace
@set -euo pipefail; \
for feat in $(SPIFFE_ALL_FEATURES); do \
extra=""; \
if [ "$$feat" = "$(DEFAULT_LANE)" ]; then \
echo "---- spiffe lane: default"; \
else \
echo "---- spiffe lane: --no-default-features --features $$feat"; \
extra="--no-default-features --features $$feat"; \
fi; \
$(CARGO) llvm-cov --no-report --manifest-path $(SPIFFE_MANIFEST) test --all-targets $$extra; \
done
# spiffe integration lane (ignored)
$(call _assert_spiffe_workload_api_test_discovery)
$(CARGO) llvm-cov --no-report --manifest-path $(SPIFFE_MANIFEST) test \
--no-default-features --features $(SPIFFE_WORKLOAD_API_INTEGRATION_FEATURES) -- --ignored
@set -euo pipefail; \
for feat in $(RUSTLS_ALL_FEATURES); do \
extra=""; \
if [ "$$feat" = "$(DEFAULT_LANE)" ]; then \
echo "---- spiffe-rustls lane: default"; \
else \
echo "---- spiffe-rustls lane: --no-default-features --features $$feat"; \
extra="--no-default-features --features $$feat"; \
fi; \
$(CARGO) llvm-cov --no-report --manifest-path $(SPIFFE_RUSTLS_MANIFEST) test --all-targets $$extra; \
done
# rustls integration (ignored)
$(CARGO) llvm-cov --no-report --manifest-path $(SPIFFE_RUSTLS_MANIFEST) test --all-targets -- --ignored
# rustls-tokio
@set -euo pipefail; \
for feat in $(RUSTLS_TOKIO_ALL_FEATURES); do \
extra=""; \
if [ "$$feat" = "$(DEFAULT_LANE)" ]; then \
echo "---- spiffe-rustls-tokio lane: default"; \
else \
echo "---- spiffe-rustls-tokio lane: --no-default-features --features $$feat"; \
extra="--no-default-features --features $$feat"; \
fi; \
$(CARGO) llvm-cov --no-report --manifest-path $(SPIFFE_RUSTLS_TOKIO_MANIFEST) test --all-targets $$extra; \
done
# spire-api
$(CARGO) llvm-cov --no-report --manifest-path $(SPIRE_API_MANIFEST) test --all-targets
$(CARGO) llvm-cov --no-report --manifest-path $(SPIRE_API_MANIFEST) test --all-targets -- --ignored
$(CARGO) llvm-cov report \
--lcov \
--output-path lcov.info \
--ignore-filename-regex 'proto/|pb/|spire-api-sdk/|build\.rs|spiffe-rustls-grpc-examples/src/|xtask/src/'
# -----------------------------------------------------------------------------
# MSRV policy checks
# -----------------------------------------------------------------------------
msrv:
$(info ==> MSRV policy check: Rust $(MSRV))
cargo +$(MSRV) --version
$(info ==> spiffe (MSRV))
$(call _msrv_test,$(SPIFFE_MANIFEST),--no-default-features --features x509)
$(call _msrv_test,$(SPIFFE_MANIFEST),--no-default-features --features transport-grpc)
$(call _msrv_test,$(SPIFFE_MANIFEST),--no-default-features --features x509-source,jwt-source,jwt,jwt-verify-rust-crypto)
$(call _msrv_doc,$(SPIFFE_MANIFEST),--no-default-features --features x509-source,jwt-source,jwt,jwt-verify-rust-crypto)
$(info ==> spire-api (MSRV))
$(call _msrv_test,$(SPIRE_API_MANIFEST),)
$(call _msrv_doc,$(SPIRE_API_MANIFEST),)
$(info ==> spiffe-rustls (MSRV))
$(call _msrv_test,$(SPIFFE_RUSTLS_MANIFEST),)
$(call _msrv_test,$(SPIFFE_RUSTLS_MANIFEST),--no-default-features --features aws-lc-rs)
$(call _msrv_doc,$(SPIFFE_RUSTLS_MANIFEST),)
$(info ==> spiffe-rustls-tokio (MSRV))
$(call _msrv_test,$(SPIFFE_RUSTLS_TOKIO_MANIFEST),)
$(call _msrv_doc,$(SPIFFE_RUSTLS_TOKIO_MANIFEST),)
# -----------------------------------------------------------------------------
# Examples
# -----------------------------------------------------------------------------
examples:
$(info ==> Build examples)
$(CARGO) build --manifest-path $(SPIFFE_RUSTLS_MANIFEST) --examples
# -----------------------------------------------------------------------------
# Dependency checks
# -----------------------------------------------------------------------------
audit:
$(info ==> Dependency audit (cargo-audit))
@command -v cargo-audit >/dev/null 2>&1 || { echo "Error: cargo-audit not found. Install with: cargo install cargo-audit"; exit 1; }
$(CARGO) generate-lockfile
$(CARGO) audit
deny:
$(info ==> Dependency policy check (cargo-deny))
@command -v cargo-deny >/dev/null 2>&1 || { echo "Error: cargo-deny not found. Install with: cargo install cargo-deny"; exit 1; }
$(CARGO) generate-lockfile
$(CARGO) deny --exclude spiffe-fuzz check
# -----------------------------------------------------------------------------
# Lane introspection
# -----------------------------------------------------------------------------
lanes:
@echo "SPIFFE_DEV_FEATURES:"
@printf " %s\n" $(SPIFFE_DEV_FEATURES)
@echo ""
@echo "SPIFFE_CI_FEATURES:"
@printf " %s\n" $(SPIFFE_CI_FEATURES)
@echo ""
@echo "SPIFFE_ALL_FEATURES:"
@printf " %s\n" $(SPIFFE_ALL_FEATURES)
@echo ""
@echo "RUSTLS_DEV_FEATURES:"
@printf " %s\n" $(RUSTLS_DEV_FEATURES)
@echo ""
@echo "RUSTLS_CI_FEATURES:"
@printf " %s\n" $(RUSTLS_CI_FEATURES)
@echo ""
@echo "RUSTLS_ALL_FEATURES:"
@printf " %s\n" $(RUSTLS_ALL_FEATURES)
@echo ""
@echo "RUSTLS_TOKIO_DEV_FEATURES:"
@printf " %s\n" $(RUSTLS_TOKIO_DEV_FEATURES)
@echo ""
@echo "RUSTLS_TOKIO_CI_FEATURES:"
@printf " %s\n" $(RUSTLS_TOKIO_CI_FEATURES)
@echo ""
@echo "RUSTLS_TOKIO_ALL_FEATURES:"
@printf " %s\n" $(RUSTLS_TOKIO_ALL_FEATURES)
@echo ""
@echo "SPIRE_API_DEV_FEATURES:"
@printf " %s\n" $(SPIRE_API_DEV_FEATURES)
@echo ""
@echo "SPIRE_API_CI_FEATURES:"
@printf " %s\n" $(SPIRE_API_CI_FEATURES)
@echo ""
@echo "SPIRE_API_ALL_FEATURES:"
@printf " %s\n" $(SPIRE_API_ALL_FEATURES)