Commit ae495d4
committed
Enforce the contract crate's dependency rule, and the minimal build
Issue #18 §D4, with §D3 alongside it.
`api/Cargo.toml` spells out a `cargo tree` command in a comment and asks that
the contract crate never link a storage engine, a native library, an HTTP
client, or an async runtime. It was left as a comment, so nothing ran it. A
forbidden dependency does not arrive by someone typing it into the manifest; it
arrives transitively, through a feature enabled two crates away, which is
exactly the way nobody notices.
The forward form is the one that works, and the manifest already explains why:
`cargo tree -i <crate> -p tinymemory-api` discards the `-p` scope, prints the
whole-workspace inverse tree, and exits 0 looking clean even when this crate is
the one at fault. This runs what the comment says to run.
Verified in both directions. The rule holds today — no match against
`rusqlite|libsqlite|git2|reqwest|regex|tokio`. And injecting `regex = "1"` into
the manifest makes the guard fire on `regex`, `regex-automata` and
`regex-syntax`, then reverting makes it pass again. A guard nobody has watched
fail is not yet a guard.
§D3 asks that `--no-default-features` still compile and bind
`NullMemoryProvider`. It does, so this pins it rather than changing anything:
the minimal configuration builds, and #21's `null_provider` integration test
runs against it — so "usable" is asserted, not just "compiles". That test is
the one that would catch a null driver which panics instead of answering, or
reports a fault instead of `Ready`.
Refs #18 (§D3, §D4)1 parent f1a3c13 commit ae495d4
1 file changed
Lines changed: 32 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
58 | 58 | | |
59 | 59 | | |
60 | 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 | + | |
61 | 93 | | |
62 | 94 | | |
63 | 95 | | |
| |||
0 commit comments