Files
tlsn-js/wasm/prover/Cargo.toml
2023-11-14 09:19:56 +03:00

112 lines
3.2 KiB
TOML

[package]
name = "tlsn-extension-rs"
version = "0.1.0"
authors = ["The tlsn-extension Developers"]
edition = "2018"
rust-version = "1.56"
[lib]
crate-type = ["cdylib"]
[dependencies]
rayon = "1.5"
wasm-bindgen-rayon = "1.0"
wasm-bindgen = "0.2.87"
js-sys = "0.3.64"
tracing = "0.1"
getrandom = { version = "0.2", features = ["js"] }
ws_stream_wasm = "0.7.4"
wasm-bindgen-futures = "0.4.37"
tokio-util = "0.7"
futures = "0.3"
serde_json = "1.0"
serde = { version = "1.0.147", features = ["derive"] }
serde-wasm-bindgen = "0.4"
url = { version = "2.0", features = ["serde"] }
futures-util = "0.3.28"
chrono = "0.4"
elliptic-curve = { version = "0.13.5", features = ["pkcs8"] }
p256 = { version = "0.13", features = ["pem", "ecdsa"] }
hyper = { version = "0.14", features = ["client", "http1"] }
console_error_panic_hook = "0.1.7"
tracing-web = "0.1.2"
tracing-subscriber = { version = "0.3", features = ["time"] }
# time crate: https://crates.io/crates/time
# NOTE: It is required, otherwise "time not implemented on this platform" error happens right after "!@# 2".
# Probably due to tokio's time feature is used in tlsn-prover?
time = { version = "0.3", features = ["wasm-bindgen"] }
# Used to calculate elapsed time.
web-time = "0.2"
# tlsn-prover = { path = "../tlsn/tlsn/tlsn-prover", features = ["tracing"] }
[dependencies.tlsn-prover]
git = "https://github.com/mhchia/tlsn.git"
branch = "dev-20231006-webtime-2"
package = "tlsn-prover"
features = ["tracing"]
[dependencies.tlsn-core]
git = "https://github.com/mhchia/tlsn.git"
branch = "dev-20231006-webtime-2"
package = "tlsn-core"
[dependencies.web-sys]
version = "0.3.4"
features = [
"BinaryType",
"Blob",
"ErrorEvent",
"FileReader",
"MessageEvent",
"ProgressEvent",
"WebSocket",
"console",
'Document',
'HtmlElement',
'HtmlInputElement',
'Window',
'Worker',
'Headers',
'Request',
'RequestInit',
'RequestMode',
'Response',
]
# Replace ring with the forked version `ring-xous` implemented in pure rust
# to make it compiled to wasm.
# Refs:
# - Rationale for `ring-xous`: https://www.bunniestudios.com/blog/?p=6521
# - Issue for wasm comptability: https://github.com/briansmith/ring/issues/918
[patch.crates-io.ring]
git="https://github.com/betrusted-io/ring-xous"
branch="0.16.20-cleanup"
[patch.crates-io.ws_stream_wasm]
# path = "../../../others/ws_stream_wasm"
# Use the patched ws_stream_wasm to fix the issue https://github.com/najamelan/ws_stream_wasm/issues/12#issuecomment-1711902958
git="https://github.com/mhchia/ws_stream_wasm"
branch="dev"
# [patch.'https://github.com/tlsnotary/tlsn-utils']
# # Use single cpu backend
# tlsn-utils = { git = 'https://www.github.com/mhchia/tlsn-utils.git', rev = "46327f0" }
# tlsn-utils-aio = { git = 'https://www.github.com/mhchia/tlsn-utils.git', rev = "46327f0" }
# The `console_error_panic_hook` crate provides better debugging of panics by
# logging them with `console.error`. This is great for development, but requires
# all the `std::fmt` and `std::panicking` infrastructure, so isn't great for
# code size when deploying.
console_error_panic_hook = { version = "0.1.7", optional = true }
[dev-dependencies]
wasm-bindgen-test = "0.3.34"
[profile.release]
# Tell `rustc` to optimize for small code size.
[package.metadata.wasm-pack.profile.release]
wasm-opt = false