mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-18 06:47:02 +08:00
feat(native): doc loader for common native (#9941)
This commit is contained in:
@@ -3,15 +3,63 @@ edition = "2021"
|
||||
name = "affine_common"
|
||||
version = "0.1.0"
|
||||
|
||||
[features]
|
||||
default = []
|
||||
doc-loader = ["docx-parser", "infer", "path-ext", "pdf-extract", "readability", "serde_json", "strum_macros", "text-splitter", "thiserror", "tree-sitter", "url"]
|
||||
tree-sitter = [
|
||||
"cc",
|
||||
"dep:tree-sitter",
|
||||
"dep:tree-sitter-c",
|
||||
"dep:tree-sitter-c-sharp",
|
||||
"dep:tree-sitter-cpp",
|
||||
"dep:tree-sitter-go",
|
||||
"dep:tree-sitter-java",
|
||||
"dep:tree-sitter-javascript",
|
||||
"dep:tree-sitter-kotlin-ng",
|
||||
"dep:tree-sitter-python",
|
||||
"dep:tree-sitter-rust",
|
||||
"dep:tree-sitter-scala",
|
||||
"dep:tree-sitter-typescript",
|
||||
]
|
||||
|
||||
[dependencies]
|
||||
chrono = { workspace = true }
|
||||
rand = { workspace = true }
|
||||
sha3 = { workspace = true }
|
||||
|
||||
docx-parser = { git = "https://github.com/toeverything/docx-parser", optional = true }
|
||||
infer = { version = "0.19.0", optional = true }
|
||||
path-ext = { version = "0.1.1", optional = true }
|
||||
pdf-extract = { version = "0.8.2", optional = true }
|
||||
readability = { version = "0.3.0", optional = true, default-features = false }
|
||||
serde_json = { version = "1.0", optional = true }
|
||||
strum_macros = { version = "0.26.2", optional = true }
|
||||
text-splitter = { version = "0.22", features = ["markdown", "tiktoken-rs"], optional = true }
|
||||
thiserror = { version = "1", optional = true }
|
||||
tree-sitter = { version = "0.25", optional = true }
|
||||
tree-sitter-c = { version = "0.23", optional = true }
|
||||
tree-sitter-c-sharp = { version = "0.23", optional = true }
|
||||
tree-sitter-cpp = { version = "0.23", optional = true }
|
||||
tree-sitter-go = { version = "0.23", optional = true }
|
||||
tree-sitter-java = { version = "0.23", optional = true }
|
||||
tree-sitter-javascript = { version = "0.23", optional = true }
|
||||
tree-sitter-kotlin-ng = { version = "1.1", optional = true }
|
||||
tree-sitter-python = { version = "0.23", optional = true }
|
||||
tree-sitter-rust = { version = "0.23", optional = true }
|
||||
tree-sitter-scala = { version = "0.23", optional = true }
|
||||
tree-sitter-typescript = { version = "0.23", optional = true }
|
||||
url = { version = "2.5", optional = true }
|
||||
|
||||
|
||||
tiktoken-rs = { workspace = true }
|
||||
|
||||
[dev-dependencies]
|
||||
criterion2 = { workspace = true }
|
||||
rayon = { workspace = true }
|
||||
|
||||
[build-dependencies]
|
||||
cc = { version = "1", optional = true }
|
||||
|
||||
[[bench]]
|
||||
harness = false
|
||||
name = "hashcash"
|
||||
|
||||
Reference in New Issue
Block a user