forked from jameslittle230/stork
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Cargo.toml
72 lines (63 loc) · 2.63 KB
/
Cargo.toml
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
[package]
name = "stork-search"
version = "1.1.0"
authors = ["James Little <[email protected]>"]
edition = "2018"
documentation = "https://stork-search.net/docs"
homepage = "https://stork-search.net"
description = "Impossibly fast web search, made for static sites."
repository = "https://github.com/jameslittle230/stork"
license = "Apache-2.0"
keywords = ["wasm", "webassembly", "search", "javascript"]
categories = ["wasm"]
exclude = ['/dist/', 'node_modules/', '/test/', '/test-assets/',]
[lib]
crate-type = ["cdylib", "rlib"]
[features]
default = ["build", "test-server"]
build = ["srtparse", "scraper", "frontmatter", "markdown", "atty", "mime", "reqwest", "indicatif"]
test-server = ["build", "futures", "hyper", "tokio"]
[dependencies]
toml = "0.5"
serde = { version = "1.0", features = ["derive"] }
bincode = "1.2.1" # V2 index serialization
rmp-serde = "0.14.3" # V3 index serialization
serde_json = "1.0"
console_error_panic_hook = "0.1.6"
num-format = "0.4.0"
rust-stemmers = "1.2.0"
once_cell = "1.5.2"
indicatif = {version = "0.15.0", optional = true}
# colored = {version = "2.0.0", optional = true}
srtparse = {version = "0.2.0", optional = true}
scraper = {version = "0.12.0", optional = true}
frontmatter = {version = "0.4.0", optional = true}
markdown = {version = "0.3.0", optional = true}
atty = {version = "0.2", optional = true}
mime = {version = "0.3.16", optional = true}
reqwest = { version = "0.11", features = ["blocking", "json"], optional = true} # for loading document contents from URLs
futures = {version = "0.3", optional = true}
hyper = {version = "0.14", features = ["server"], optional = true}
tokio = { version = "1.2", features = ["full"], optional = true }
wasm-bindgen = { version = "0.2", features = ["serde-serialize"] }
[package.metadata.wasm-pack.profile.release]
# wasm-opt is out of date in wasm-bindgen, so we have to manually
# enable the "mutable globals" feature so wasm-opt doesn't reject
# the wasm blob that gets generated.
# See: https://github.com/rustwasm/wasm-pack/issues/886#issuecomment-667669802
wasm-opt = ["-Oz", "--enable-mutable-globals"]
[dev-dependencies]
criterion = "0.3"
[[bench]]
name = "basic"
harness = false
[profile.release]
# This config option gives LLVM more opportunities to inline and prune functions,
# which makes the WASM binary smaller. Adding this was inspired by
# https://rustwasm.github.io/book/reference/code-size.html
#
# @TODO 2021-02-24: Starting with commit 7800aedfbb6b0e97a075cf6924077db2ddff7939,
# keeping this option in the full release build configuration means that
# `cargo build --release` mysteriously fails on the benchmark machine, so
# I commented it out.
# lto = true