# THIS FILE IS AUTOMATICALLY GENERATED BY CARGO
#
# When uploading crates to the registry Cargo will automatically
# "normalize" Cargo.toml files for maximal compatibility
# with all versions of Cargo and also rewrite `path` dependencies
# to registry (e.g., crates.io) dependencies.
#
# If you are reading this file be aware that the original Cargo.toml
# will likely look very different (and much more reasonable).
# See Cargo.toml.orig for the original contents.

[package]
edition = "2024"
rust-version = "1.85"
name = "riptoken"
version = "0.2.0"
authors = ["Dae Choi <daechoi70@gmail.com>"]
build = false
exclude = [
    "*.tiktoken",
    ".venv/",
    "dist/",
    "tests/python/",
    "scripts/",
]
autolib = false
autobins = false
autoexamples = false
autotests = false
autobenches = false
description = "Fast BPE tokenizer for LLMs — a faster, drop-in compatible reimplementation of tiktoken"
homepage = "https://github.com/daechoi/riptoken"
documentation = "https://docs.rs/riptoken"
readme = "README.md"
keywords = [
    "tokenizer",
    "bpe",
    "llm",
    "tiktoken",
    "nlp",
]
categories = [
    "text-processing",
    "science",
    "parser-implementations",
]
license = "MIT"
repository = "https://github.com/daechoi/riptoken"

[features]
default = []
python = ["dep:pyo3"]

[lib]
name = "riptoken"
crate-type = [
    "rlib",
    "cdylib",
]
path = "src/lib.rs"

[[example]]
name = "parallel_bench"
path = "examples/parallel_bench.rs"

[[test]]
name = "integration"
path = "tests/integration.rs"

[[bench]]
name = "bpe"
path = "benches/bpe.rs"
harness = false

[dependencies.fancy-regex]
version = "0.17"

[dependencies.pyo3]
version = "0.27.2"
features = [
    "extension-module",
    "macros",
]
optional = true
default-features = false

[dependencies.rayon]
version = "1.10"

[dependencies.regex]
version = "1.11"

[dependencies.rustc-hash]
version = "2"

[dev-dependencies.base64]
version = "0.22"

[profile.profiling]
debug = 2
inherits = "release"
strip = false

[profile.release]
opt-level = 3
lto = "fat"
codegen-units = 1
strip = true
