-
Notifications
You must be signed in to change notification settings - Fork 121
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
WASM backend #25
WASM backend #25
Conversation
Signed-off-by: Yoshua Wuyts <yoshuawuyts@gmail.com>
Signed-off-by: Yoshua Wuyts <yoshuawuyts@gmail.com>
Signed-off-by: Yoshua Wuyts <yoshuawuyts@gmail.com>
Signed-off-by: Yoshua Wuyts <yoshuawuyts@gmail.com>
Signed-off-by: Yoshua Wuyts <yoshuawuyts@gmail.com>
Signed-off-by: Yoshua Wuyts <yoshuawuyts@gmail.com>
Signed-off-by: Yoshua Wuyts <yoshuawuyts@gmail.com>
Signed-off-by: Yoshua Wuyts <yoshuawuyts@gmail.com>
Signed-off-by: Yoshua Wuyts <yoshuawuyts@gmail.com>
Okay, into a bit of a corner here. Because:
So I think we'll have to do a manual |
Signed-off-by: Yoshua Wuyts <yoshuawuyts@gmail.com>
Signed-off-by: Yoshua Wuyts <yoshuawuyts@gmail.com>
I wonder what's the reason for JS refs not being sendable between threads. Do you think that's just an overly conservative measure in Rust's wasm bindings? Or is there a deeper reason truly preventing those values from being sendable? |
Signed-off-by: Yoshua Wuyts <yoshuawuyts@gmail.com>
@stjepang Only JS vectors and strings can be sent over thread bounds (web workers). Rich data types such as DOM nodes have to be serialized / deserialized first. The This patch is good to go I think! We're using a whole lot of |
Signed-off-by: Yoshua Wuyts <yoshuawuyts@gmail.com>
Signed-off-by: Yoshua Wuyts <yoshuawuyts@gmail.com>
Signed-off-by: Yoshua Wuyts <yoshuawuyts@gmail.com>
Signed-off-by: Yoshua Wuyts <yoshuawuyts@gmail.com>
Going to go ahead and merge this! |
WIP wasm backend. Should work out of the box. A lot of changes here include changing our middleware and backends to "just work" in the browser.
Currently running into some problems where we can't use
await
and send JsObject's between threads, possibly related to rustwasm/wasm-bindgen#1695. Should probably spend more time figuring it out.https://github.com/yoshuawuyts/surf/blob/b756107dfce8553a10c1bc1220ef627244b56b8a/src/http_client/wasm.rs#L33-L44