mirror of
https://github.com/tlsnotary/tlsn.git
synced 2026-01-09 05:17:55 -05:00
refactor: move web-spawn under web feature (#949)
* refactor: move web-spawn under web feature * add arch conditional
This commit is contained in:
@@ -14,6 +14,7 @@ workspace = true
|
||||
default = ["rayon"]
|
||||
rayon = ["mpz-common/rayon"]
|
||||
force-st = ["mpz-common/force-st"]
|
||||
web = ["dep:web-spawn"]
|
||||
|
||||
[dependencies]
|
||||
tlsn-attestation = { workspace = true }
|
||||
@@ -27,7 +28,7 @@ tlsn-cipher = { workspace = true }
|
||||
|
||||
serio = { workspace = true, features = ["compat"] }
|
||||
uid-mux = { workspace = true, features = ["serio"] }
|
||||
web-spawn = { workspace = true }
|
||||
web-spawn = { workspace = true, optional = true }
|
||||
|
||||
mpz-common = { workspace = true }
|
||||
mpz-core = { workspace = true }
|
||||
|
||||
@@ -11,7 +11,7 @@ pub(crate) const MAX_CONCURRENCY: usize = 8;
|
||||
pub(crate) fn build_mt_context(mux: MuxControl) -> Multithread {
|
||||
let builder = Multithread::builder().mux(mux).concurrency(MAX_CONCURRENCY);
|
||||
|
||||
#[cfg(target_arch = "wasm32")]
|
||||
#[cfg(all(feature = "web", target_arch = "wasm32"))]
|
||||
let builder = builder.spawn_handler(|f| {
|
||||
let _ = web_spawn::spawn(f);
|
||||
Ok(())
|
||||
|
||||
@@ -24,7 +24,7 @@ no-bundler = ["web-spawn/no-bundler"]
|
||||
|
||||
[dependencies]
|
||||
tlsn-core = { workspace = true }
|
||||
tlsn = { workspace = true }
|
||||
tlsn = { workspace = true, features = ["web"] }
|
||||
tlsn-server-fixture-certs = { workspace = true }
|
||||
tlsn-tls-client-async = { workspace = true }
|
||||
tlsn-tls-core = { workspace = true }
|
||||
|
||||
Reference in New Issue
Block a user