Repository navigation
Expand file tree
/
Copy pathCargo.toml
More file actions
109 lines (96 loc) · 2.85 KB
/
Copy pathCargo.toml
File metadata and controls
109 lines (96 loc) · 2.85 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
[package]
name = "tinyjuice"
version = "0.7.1"
edition = "2024"
license = "GPL-3.0-only"
description = "Pluggable token compression for OpenHuman."
repository = "https://github.com/tinyhumansai/tinyjuice"
readme = "README.md"
keywords = ["llm", "tokens", "compression", "openhuman", "context"]
categories = ["text-processing"]
autobins = false
exclude = [
".github/",
".gitmodules",
"docs/",
"vendor/tinybus/",
"vendor/tinyagents/",
"crates/tinyjuice-examples/",
"wiki/",
]
[workspace]
members = ["crates/tinyjuice-bus", "crates/tinyjuice-module"]
default-members = [".", "crates/tinyjuice-bus", "crates/tinyjuice-module"]
exclude = ["vendor/tinybus", "vendor/tinyagents", "crates/tinyjuice-examples"]
resolver = "3"
[dependencies]
# Optional adapter boundary: REPL ops as `tinytools::Tool` impls.
tinytools = { git = "https://github.com/tinyhumansai/tinytools", optional = true }
anyhow = { version = "1", optional = true }
uuid = { version = "1", features = ["v4"], optional = true }
jaq-core = { version = "3", optional = true }
jaq-std = { version = "3", optional = true }
jaq-json = { version = "2", optional = true }
# The wire contract, defined once and shared with the module and with hosts.
# This crate re-exports its types from `src/types.rs` rather than declaring a
# second copy — see the note there.
tinyjuice-bus = { path = "crates/tinyjuice-bus" }
async-trait = "0.1"
dirs = "7"
hex = "0.4"
log = "0.4"
once_cell = "1"
regex = "1"
serde = { version = "1", features = ["derive"] }
serde_json = "1"
sha2 = "0.11"
thiserror = "2"
tokio = { version = "1", features = ["sync", "rt", "time"] }
unicode-segmentation = "1"
unicode-width = "0.2"
[dependencies.tree-sitter]
version = "0.27"
optional = true
[dependencies.tree-sitter-python]
version = "0.25"
optional = true
[dependencies.tree-sitter-rust]
version = "0.24"
optional = true
[dependencies.tree-sitter-typescript]
version = "0.23"
optional = true
[dev-dependencies]
criterion = "0.8"
tempfile = "3"
tokio = { version = "1", features = ["macros", "rt", "test-util"] }
[[bin]]
name = "tinyjuice"
path = "src/bin/tinyjuice.rs"
[[bin]]
name = "tinyjuice-reduce"
path = "src/main.rs"
[[bench]]
name = "compression"
harness = false
[features]
default = ["tinyjuice-treesitter"]
# Exposes the REPL ops as `tinytools::Tool` impls (see src/repl/tools.rs).
tinytools = ["dep:tinytools", "dep:anyhow", "jq"]
# Turn-bound `MlHost.Generate` registry (src/host/generate.rs).
host = ["dep:anyhow", "dep:uuid"]
# jq-style queries over JSON outputs (the `jq` REPL op and `juice_jq` tool).
jq = ["dep:jaq-core", "dep:jaq-std", "dep:jaq-json"]
tinyjuice-treesitter = [
"dep:tree-sitter",
"dep:tree-sitter-python",
"dep:tree-sitter-rust",
"dep:tree-sitter-typescript",
]
[profile.release]
lto = "thin"
codegen-units = 1
strip = "debuginfo"
[[example]]
name = "repl_tool_schema"
required-features = ["tinytools"]