|
|
|
[package]
|
|
|
|
name = "markov"
|
|
|
|
version = "0.5.1"
|
|
|
|
description = "Generate string of text from Markov chain fed by stdin"
|
|
|
|
authors = ["Avril <flanchan@cumallover.me>"]
|
|
|
|
edition = "2018"
|
|
|
|
|
|
|
|
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
|
|
|
|
|
|
|
[features]
|
|
|
|
default = ["compress-chain", "split-newlines"]
|
|
|
|
|
|
|
|
# Compress the chain data file when saved to disk
|
|
|
|
compress-chain = ["async-compression"]
|
|
|
|
|
|
|
|
# Treat each new line as a new set to feed instead of feeding the whole data at once
|
|
|
|
split-newlines = []
|
|
|
|
|
|
|
|
# Always aggregate incoming buffer instead of streaming them
|
|
|
|
# This will make feeds faster but allocate full buffers for the aggregated body
|
|
|
|
#
|
|
|
|
# Large write: ~95ms
|
|
|
|
#
|
|
|
|
# NOTE: This does nothing if `split-newlines` is not enabled
|
|
|
|
always-aggregate = []
|
|
|
|
|
|
|
|
# Feeds will hog the buffer lock until the whole body has been fed, instead of acquiring lock every time
|
|
|
|
# This will make feeds of many lines faster but can potentially cause DoS
|
|
|
|
#
|
|
|
|
# With: ~169ms
|
|
|
|
# Without: ~195ms
|
|
|
|
#
|
|
|
|
# NOTE:
|
|
|
|
# This does nothing if `always-aggregate` is enabled and/or `split-newlines` is not enabled
|
|
|
|
hog-buffer = []
|
|
|
|
|
|
|
|
# Enable the /api/ route
|
|
|
|
api = []
|
|
|
|
|
|
|
|
[profile.release]
|
|
|
|
opt-level = 3
|
|
|
|
lto = "fat"
|
|
|
|
codegen-units = 1
|
|
|
|
|
|
|
|
[dependencies]
|
|
|
|
chain = {package = "markov", version = "1.1.0"}
|
|
|
|
tokio = {version = "0.2", features=["full"]}
|
|
|
|
warp = "0.2"
|
|
|
|
pretty_env_logger = "0.4.0"
|
|
|
|
hyper = "0.13.8"
|
|
|
|
log = "0.4.11"
|
|
|
|
cfg-if = "1.0.0"
|
|
|
|
futures = "0.3.6"
|
|
|
|
serde_cbor = "0.11.1"
|
|
|
|
lzzzz = {version = "0.2", features=["tokio-io"], optional=true}
|
|
|
|
serde = {version ="1.0", features=["derive"]}
|
|
|
|
toml = "0.5.6"
|
|
|
|
async-compression = {version = "0.3.5", features=["tokio-02", "bzip2"], optional=true}
|
|
|
|
pin-project = "0.4.26"
|
|
|
|
libc = "0.2.79"
|