http-rs / tide

Fast and friendly HTTP server framework for async Rust
https://docs.rs/tide
Apache License 2.0
5.04k stars 322 forks source link

WASM support #871

Open logankeenan opened 2 years ago

logankeenan commented 2 years ago

I'm looking at using tide as a replacement for my current portable web server which can be embedded in different compile targets, one of those being WASM. Currently, tide fails to compile due to APIs incompatible with WASM like file system access and task:::spawn. I created a fork and have refactored code or excluded modules which cause complication failures with cfg_if Perhaps, there's a better solution. I also created a simple demo repo which consumes my branch. Let me know what I can do to contribute and help! Thanks!

maxcountryman commented 2 years ago

I'd be keen to see how this might support native Rust Cloudflare Workers.

logankeenan commented 2 years ago

@maxcountryman

This works pretty well inside a Rust Cloudflare worker. I wrote a blog post about it.