[package]
edition = "2021"
rust-version = "1.75"
name = "codec-rs"
version = "0.5.0"
authors = ["wdunn001"]
build = false
autolib = false
autobins = false
autoexamples = false
autotests = false
autobenches = false
description = "Isomorphic tokenizer + detokenizer for the Codec binary transport protocol — for Rust. Decodes streaming token IDs from Codec-compliant servers (vLLM, SGLang) and encodes text into IDs for the bidirectional path."
homepage = "https://github.com/wdunn001/Codec"
documentation = "https://docs.rs/codec-rs"
readme = "README.md"
keywords = [
"ai",
"llm",
"tokens",
"codec",
"transport",
]
categories = ["api-bindings"]
license = "MIT"
repository = "https://github.com/wdunn001/Codec"
[features]
default = ["http"]
http = ["dep:reqwest"]
tokio = [
"dep:tokio",
"dep:futures-util",
"dep:async-stream",
"dep:pin-project-lite",
]
[lib]
name = "codec_rs"
path = "src/lib.rs"
[[test]]
name = "bpe_tests"
path = "tests/bpe_tests.rs"
[[test]]
name = "compression"
path = "tests/compression.rs"
[[test]]
name = "detokenize_tests"
path = "tests/detokenize_tests.rs"
[[test]]
name = "map_loader_tests"
path = "tests/map_loader_tests.rs"
[[test]]
name = "stream_tests"
path = "tests/stream_tests.rs"
[[test]]
name = "tool_calling_block_tests"
path = "tests/tool_calling_block_tests.rs"
[[test]]
name = "tool_watcher_tests"
path = "tests/tool_watcher_tests.rs"
[[test]]
name = "translator_tests"
path = "tests/translator_tests.rs"
[dependencies.async-stream]
version = "0.3"
optional = true
[dependencies.futures-util]
version = "0.3"
optional = true
[dependencies.hex]
version = "0.4"
[dependencies.pin-project-lite]
version = "0.2"
optional = true
[dependencies.regex]
version = "1.10"
features = [
"unicode-perl",
"unicode-case",
"unicode-gencat",
"unicode-bool",
"unicode-segment",
"unicode-script",
"unicode-age",
]
[dependencies.reqwest]
version = "0.12"
features = [
"blocking",
"rustls-tls",
"gzip",
"brotli",
]
optional = true
default-features = false
[dependencies.rmp]
version = "0.8"
[dependencies.rmp-serde]
version = "1.3"
[dependencies.serde]
version = "1.0"
features = ["derive"]
[dependencies.serde_json]
version = "1.0"
[dependencies.sha2]
version = "0.10"
[dependencies.thiserror]
version = "1.0"
[dependencies.tokio]
version = "1"
features = [
"io-util",
"rt",
]
optional = true
[dev-dependencies.futures-util]
version = "0.3"
[dev-dependencies.tokio]
version = "1"
features = ["full"]
[dev-dependencies.zstd]
version = "0.13"