[package] authors = ["Xintong Sun "] categories = ["science", "text-processing"] description = "A fast constrained decoding engine based on context free grammar." edition = "2021" exclude = [".*"] keywords = [ "deep-learning", "language-model", "guided-generation", "structured", "constrained-decoding", ] license = "MIT OR Apache-2.0" name = "kbnf" repository = "https://github.com/Dan-Wanna-M/kbnf" version = "0.5.5" [lib] name = "kbnf" crate-type = ["cdylib", "rlib"] [dependencies] ahash = { version = "0.8.11", features = ["serde"] } getrandom = { version = "0.2" } thiserror = "1.0.61" kbnf-syntax = "0.5.2" num = "0.4.3" jaggedarray = "0.2.11" string-interner = "0.17.0" nom = "7.1.3" tinyvec = "1.6.0" nonmax = "0.5.5" fixedbitset-stack = "0.5.7" kbnf-regex-automata = "0.4.10" serde = "1.0.203" strum = { version = "0.26", features = ["derive"] } displaydoc = "0.2.4" wasm-bindgen = { version = "0.2", optional = true } serde-wasm-bindgen = { version = "0.6.5", optional = true } js-sys = { version = "0.3.69", optional = true } pyo3 = { version = "0.22", features = [ "multiple-pymethods", "extension-module", "abi3-py37", ], optional = true } mimalloc = { version = "0.1.43", optional = true } log = "0.4.22" pyo3-log = { version = "0.11.0", optional = true } general-sam = "1.0.0" [dev-dependencies] insta = { version = "1.26.0" } serde_json = "1.0.48" criterion = "0.5.1" [features] default = [] wasm = ["getrandom/js", "wasm-bindgen", "serde-wasm-bindgen", "js-sys"] python = ["pyo3", "pyo3-log"] [[bench]] name = "simple" harness = false [[bench]] name = "profiler" harness = false [profile.bench] debug = false