use h2-wasm

This commit is contained in:
Toshit Chawda 2024-10-21 17:38:50 -07:00
parent ee08a10e10
commit 065de8e85f
No known key found for this signature in database
GPG key ID: 91480ED99E2B3D9D
7 changed files with 33 additions and 9 deletions

View file

@ -1,6 +1,6 @@
[package]
name = "epoxy-client"
version = "2.1.13"
version = "2.1.14"
edition = "2021"
[lib]
@ -50,6 +50,10 @@ features = ["web"]
version = "*"
features = ["nightly"]
[dependencies.instant]
version = "*"
features = ["wasm-bindgen"]
[features]
default = ["full"]
full = ["dep:fastwebsockets", "dep:async-compression", "dep:rustls-webpki", "dep:rustls-pemfile", "hyper-util-wasm/http2"]

View file

@ -30,7 +30,7 @@ else
fi
mv out/epoxy_client_bg.wasm out/epoxy_client_unoptimized.wasm
wasm-opt --signext-lowering out/epoxy_client_unoptimized.wasm -o out/epoxy_client_lowered.wasm
wasm-opt $WASMOPTFLAGS --signext-lowering out/epoxy_client_unoptimized.wasm -o out/epoxy_client_lowered.wasm
if [ "${RELEASE:-0}" = "1" ]; then
(

View file

@ -1,6 +1,6 @@
{
"name": "@mercuryworkshop/epoxy-tls",
"version": "2.1.13-1",
"version": "2.1.14-1",
"description": "A wasm library for using raw encrypted tls/ssl/tcp/udp/https/websocket streams on the browser",
"scripts": {
"build": "./build.sh"

View file

@ -2,7 +2,7 @@
set -euo pipefail
shopt -s inherit_errexit
export RELEASE=1
export RELEASE="${RELEASE:-1}"
rm -r full minimal || true

View file

@ -424,10 +424,16 @@ impl EpoxyClient {
};
let service = StreamProviderService(stream_provider.clone());
let client = Client::builder(WasmExecutor)
let mut builder = Client::builder(WasmExecutor);
builder
.http09_responses(true)
.http1_title_case_headers(options.title_case_headers)
.http1_max_headers(options.header_limit)
.http1_max_headers(options.header_limit);
#[cfg(feature = "full")]
builder
.http2_max_concurrent_reset_streams(10); // set back to default, on wasm it is 0
let client = builder
.build(service);
Ok(Self {