Repository navigation
Expand file tree
/
Copy pathCargo.toml
More file actions
150 lines (139 loc) · 6.45 KB
/
Copy pathCargo.toml
File metadata and controls
150 lines (139 loc) · 6.45 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
[package]
name = "llmman"
# MAJOR.MINOR only: CI replaces PATCH with the commit count before building
# and publishing (packaging/version.sh), so every commit on main ships as
# e.g. 0.1.324. Bump MAJOR or MINOR here to start a new series; leave PATCH 0.
version = "0.1.0"
edition = "2021"
description = "Run any agent on any model, models stored as OCI images"
license = "Apache-2.0"
repository = "https://github.com/llmmanorg/llmman"
homepage = "https://github.com/llmmanorg/llmman"
documentation = "https://docs.rs/llmman"
readme = "README.md"
keywords = ["llm", "oci", "inference", "gguf", "ai"]
categories = ["command-line-utilities", "science"]
# Not shipped in the .crate. build.rs needs go-shim/ (the CGO archive) and
# webui/ (embedded via include_bytes!); the rest is dev/CI-only. An
# `exclude`, not an `include`, so a new build.rs input is never dropped
# silently. (fuzz/ is its own crate; Cargo already leaves it out.)
exclude = [
"vllm-plugin/",
"packaging/",
"docs/",
".github/",
]
[lib]
name = "llmman"
path = "src/lib.rs"
[[bin]]
name = "llmman"
path = "src/main.rs"
[dependencies]
# `env`: `serve --runtime` doubles as LLMMAN_RUNTIME (cmd::serve::runtime).
clap = { version = "4", features = ["derive", "env", "wrap_help"] }
serde = { version = "1", features = ["derive"] }
serde_json = "1"
yaml_serde = "0.10"
sha2 = "0.10"
hex = "0.4"
base64 = "0.22"
# `llmman run`'s image-path detection is a verbatim port of ollama's
# extractFileNames regex (cmd/interactive.go) — see cmd::run.
regex = "1"
anyhow = "1"
walkdir = "2"
dunce = "1"
chrono = { version = "0.4", features = ["serde"] }
dirs = "5"
tar = "0.4"
# `ws` for the web UI's terminal (`/llmman/shell`, src/cmd/serve/shell.rs).
axum = { version = "0.7", features = ["ws"] }
# TLS termination for `llmman serve` (LLMMAN_TLS_CERT/LLMMAN_TLS_KEY).
# `no-provider`: rustls's ring and aws-lc-rs providers are both already
# in the tree (reqwest's and the AWS SDK's); serve installs ring itself
# rather than have this pull a preference of its own.
axum-server = { version = "0.7", features = ["tls-rustls-no-provider"] }
rustls = { version = "0.23", default-features = false, features = ["ring", "std"] }
tower-http = { version = "0.6", features = ["cors"] }
# The pty behind that terminal: one crate for Unix ptys and Windows
# ConPTY, and its default program is already "the user's login shell".
portable-pty = "0.9"
libc = "0.2"
tokio-util = { version = "0.7", features = ["io"] }
toml = { version = "0.8", default-features = false, features = ["parse"] }
# `llmman config set` edits a file people also hand-edit, so comments and
# layout have to survive a one-key write; serializing a `Conf` back out
# would drop both. Already compiled as `toml`'s own parser.
toml_edit = "0.22"
tokio = { version = "1", features = ["full"] }
reqwest = { version = "0.12", default-features = false, features = ["json", "stream", "blocking", "rustls-tls", "http2", "charset"] }
futures = "0.3"
bytes = "1"
indicatif = "0.18"
console = { version = "0.16", default-features = false, features = ["std"] }
flate2 = "1"
zip = { version = "2", default-features = false, features = ["deflate"] }
libloading = "0.8"
multer = "3"
# Cosmos3 prompts are tokenized from the pack's tokenizer.json (mediagen::cosmos3);
# pure-Rust build, the pre-tokenizer regexes need fancy-regex's lookahead.
tokenizers = { version = "0.22", default-features = false, features = ["fancy-regex"] }
# conditioning images for image-to-video and action runs
image = { version = "0.25", default-features = false, features = ["png", "jpeg"] }
# Real Xet-protocol downloads for HuggingFace files too large for the
# plain-HTTP path to reliably serve — see src/xet_fetch.rs. Its
# xet_session API re-exports XetFileInfo (from xet-data) and HeaderMap
# (from http) directly, so this is the only xet-core crate needed
# here. Exact-pinned (not "1.6") since it's one of xet-core's own
# internal workspace crates, not an independently semver-stable API,
# despite being on crates.io.
hf-xet = "=1.6.0"
# `s3://` source support (src/sources/s3.rs) — the official SDK rather
# than a hand-rolled SigV4 signer so the whole credential chain (env
# vars, ~/.aws/{config,credentials} profiles, SSO, assume-role, IMDS/ECS
# container roles) keeps working exactly as it did when this source was
# implemented against aws-sdk-go-v2 in the Go shim. Both crates version
# their own API independently of the "1" umbrella, hence two entries.
#
# Non-default features throughout: the defaults still pull the legacy
# hyper-0.14/rustls-0.21 HTTP client alongside the hyper-1.x/rustls-0.23
# one `reqwest` already brings in — `default-https-client` selects the
# latter alone, so there is exactly one TLS stack in the binary.
aws-config = { version = "1", default-features = false, features = ["default-https-client", "rt-tokio", "credentials-process", "sso"] }
aws-sdk-s3 = { version = "1", default-features = false, features = ["default-https-client", "rt-tokio"] }
[target.'cfg(windows)'.dependencies]
same-file = "1"
[features]
default = ["docker"]
docker = []
podman = []
# Exposes a #[doc(hidden)] pub wrapper around private parser internals for
# the fuzz/ crate to call. Never enabled outside fuzzing: it does not
# change any parsing behavior, only visibility.
fuzzing = []
[dev-dependencies]
tempfile = "3"
# A WebSocket client for the `/llmman/shell` tests; the same crate axum's
# `ws` feature already builds, at the version it pins.
tokio-tungstenite = "0.24"
# Shared-listener and pinned-upstream TLS tests generate short-lived identities
# instead of storing a private key in the repository.
rcgen = "0.14"
[build-dependencies]
flate2 = "1"
# build.rs pins the web UI's downloaded mark by hash (see FETCHED_ASSETS).
sha2 = "0.10"
hex = "0.4"
# `cargo binstall llmman` fetches the prebuilt release binary instead of
# compiling, so it needs neither a Rust nor a Go toolchain.
#
# `pkg-fmt = "bin"` because the assets are bare binaries, not archives (see
# the `release` job's "Rename binaries for release" step). Their names
# already match binstall's default `{ name }-{ target }{ binary-ext }`
# layout, so nothing about how releases are published had to change. The URL
# is spelled out rather than using `{ repo }` so it does not depend on the
# `repository` field staying put.
[package.metadata.binstall]
pkg-url = "https://github.com/llmmanorg/llmman/releases/download/v{ version }/llmman-{ target }{ binary-ext }"
pkg-fmt = "bin"