Repository navigation
Expand file tree
/
Copy pathCargo.toml
More file actions
69 lines (63 loc) · 1.88 KB
/
Copy pathCargo.toml
File metadata and controls
69 lines (63 loc) · 1.88 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
[package]
name = "twokey"
version = "0.2.0"
edition = "2024"
rust-version = "1.90"
authors = ["Azazel Labs LLC"]
description = "Prevent AI-authored changes to protected code. Paths, tree-sitter symbols, content rules, markers, CI and agent hooks."
license = "MIT-0"
repository = "https://github.com/Azazel-Labs/twokey"
homepage = "https://github.com/Azazel-Labs/twokey"
readme = "README.md"
keywords = ["ai", "guardrails", "code-review", "git", "tree-sitter"]
categories = ["command-line-utilities", "development-tools"]
# Only what's needed to build; keeps the crate small and reviewable.
include = [
"/src/**",
"/examples/twokey.toml",
"/Cargo.toml",
"/Cargo.lock",
"/README.md",
"/LICENSE",
"/docs/**",
]
# `cargo binstall twokey` downloads the prebuilt GitHub release binary instead
# of compiling (and never touches crates.io beyond reading this metadata).
[package.metadata.binstall]
pkg-url = "{ repo }/releases/download/v{ version }/{ name }-v{ version }-{ target }{ archive-suffix }"
bin-dir = "{ bin }{ binary-ext }"
pkg-fmt = "tgz"
[package.metadata.binstall.overrides.x86_64-pc-windows-msvc]
pkg-fmt = "zip"
[dependencies]
anyhow = "1"
clap = { version = "4", features = ["derive", "env"] }
globset = "0.4"
regex = "1"
serde = { version = "1", features = ["derive"] }
serde_json = "1"
similar = "3.2"
toml = "1.1"
tree-sitter = "0.27"
tree-sitter-rust = "0.24"
tree-sitter-python = "0.25"
tree-sitter-javascript = "0.25"
tree-sitter-typescript = "0.23"
tree-sitter-go = "0.25"
tree-sitter-java = "0.23"
tree-sitter-c-sharp = "0.23"
tree-sitter-ruby = "0.23"
# Keep lint policy in Cargo so local builds and CI use the same rules.
[lints.rust]
unsafe_code = "forbid"
[lints.clippy]
all = { level = "warn", priority = -1 }
dbg_macro = "warn"
todo = "warn"
unimplemented = "warn"
allow_attributes = "warn"
undocumented_unsafe_blocks = "warn"
[profile.release]
lto = true
codegen-units = 1
strip = true