chore(workspace): cargo-deny 0.18 activation (Phase 1 Task 1.8 Step 6)

- deny.toml: add [graph].targets to limit metadata to native+wasm32
  (avoid Android/iOS edition-2024 deps that fail rustc 1.82 cargo metadata)
- deny.toml: [bans] allow-wildcard-paths = true for workspace path deps
- crates/*/Cargo.toml: add explicit version="0.1.0" alongside path = "..."
  (cargo-deny rejects wildcard-path deps for publishable crates)

cargo-deny 0.16.4 hits a CVSS 4.0 parse error AND lacks edition-2024 cargo
metadata support; bumped to 0.18.9 (installed via stable toolchain). Run
cargo-deny with RUSTUP_TOOLCHAIN=stable so it uses cargo 1.95 for metadata
parsing while project itself still builds on 1.82.

Verified: advisories ok, bans ok, licenses ok, sources ok (exit 0)
on both native and wasm32-unknown-unknown targets.
This commit is contained in:
Kayshen-X 2026-05-03 23:05:00 +08:00
parent f5cfcca286
commit f3c6a09788
7 changed files with 20 additions and 7 deletions

View file

@ -11,7 +11,7 @@ name = "openpencil_shell_native"
path = "src/lib.rs"
[dependencies]
openpencil-shell-core = { path = "../openpencil-shell-core" }
openpencil-shell-core = { path = "../openpencil-shell-core", version = "0.1.0" }
# Native-only deps cfg-gated 在 wasm32 之外。这一步关键(解 codex round 2 B1 BLOCK
# 如果不 cfg-gatecargo 会先 fetch + run skia-safe 的 build.rs在 wasm32 上构建失败),

View file

@ -12,7 +12,7 @@ path = "src/lib.rs"
crate-type = ["cdylib", "rlib"]
[dependencies]
openpencil-shell-core = { path = "../openpencil-shell-core" }
openpencil-shell-core = { path = "../openpencil-shell-core", version = "0.1.0" }
wasm-bindgen = "0.2"
js-sys = "0.3"

View file

@ -11,4 +11,4 @@ name = "pen_codegen"
path = "src/lib.rs"
[dependencies]
pen-types = { path = "../pen-types" }
pen-types = { path = "../pen-types", version = "0.1.0" }

View file

@ -11,6 +11,6 @@ name = "pen_core"
path = "src/lib.rs"
[dependencies]
pen-types = { path = "../pen-types" }
pen-types = { path = "../pen-types", version = "0.1.0" }
serde = { workspace = true }
thiserror = { workspace = true }

View file

@ -11,5 +11,5 @@ name = "pen_engine"
path = "src/lib.rs"
[dependencies]
pen-types = { path = "../pen-types" }
pen-core = { path = "../pen-core" }
pen-types = { path = "../pen-types", version = "0.1.0" }
pen-core = { path = "../pen-core", version = "0.1.0" }

View file

@ -11,6 +11,6 @@ name = "pen_figma"
path = "src/lib.rs"
[dependencies]
pen-types = { path = "../pen-types" }
pen-types = { path = "../pen-types", version = "0.1.0" }
serde = { workspace = true }
serde_json = { workspace = true }

View file

@ -3,6 +3,17 @@
[graph]
all-features = false
# 限定到实际发布目标macOS/Linux/Windows native + wasm32
# 不限定的话 cargo-deny 默认尝试所有 target含 Android/iOS
# 拉进 jni / android-activity 等 edition-2024 deps在 rustc 1.82 上 cargo metadata 失败。
targets = [
{ triple = "x86_64-unknown-linux-gnu" },
{ triple = "aarch64-unknown-linux-gnu" },
{ triple = "x86_64-apple-darwin" },
{ triple = "aarch64-apple-darwin" },
{ triple = "x86_64-pc-windows-msvc" },
{ triple = "wasm32-unknown-unknown" },
]
[licenses]
allow = [
@ -27,6 +38,8 @@ ignore = []
[bans]
multiple-versions = "warn"
wildcards = "deny"
# 允许 workspace 内部 path 依赖不写 version标准实践避免每次 bump 都改两处)。
allow-wildcard-paths = true
deny = [
# WASM bundle 黑名单kickoff spec §1.2 invariant
"pen-agent-cli",