refactor: move web-spawn under web feature (#949)

* refactor: move web-spawn under web feature

* add arch conditional
This commit is contained in:
sinu.eth
2025-07-29 07:11:16 -07:00
committed by GitHub
parent 2d399d5e24
commit 33153d1124
3 changed files with 4 additions and 3 deletions

View File

@@ -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 }

View File

@@ -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(())

View File

@@ -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 }