Show HN: Faasta – A self-hosted Serverless platform for WASM-wasi-HTTP in Rust
github.comI've just released an early version off my project I've been working on for a few months now and would love some feedback.
https://github.com/fourlexboehm/faasta
I was surprised there isn't yet an open/source and standards compliant way to host wasi-http functions in a way that takes advantages of WASM, a multi tenanted application.
If you're not familiar with wasi, Compared to something like AWS Lambda, this approach is much more efficient as a single process can serve 1000s of function invocations concurrently and asynchronously, instead requiring an entire VM.
This is still early days for the project, but feel free to download the cli utility with cargo install cargo-faasta.
Feel free to test deploying functions on my hosted instance at https://website.faasta.xyz.
The service is free to use and currently supports deployments via GitHub OAuth, with a limit of 10 functions per GitHub account.
That's a really cool implementation! I hope I'll have some time soon to have a peek at the code. I am honestly a bit surprised to see that none of the major cloud providers are even thinking to leverage WASM and WASI for serverless...
After delving into this, it seems Wasmer tried, but as they weren't standards compliant, adoption/ecosystem support never followed.
The Bytecode alliance is taking their time stabilizing wasi. wasip2 which is needed for the wasi-http realm this relies on has only really existed for a few months as a stable Rust target, and still misses a lot of the really cool features that will come with wasip3 like full async support.
I suspect Cloud providers will adopt wasi after 1.0, but that is likely years away. I don't think wasi-http will change much before then so now is the time to start building with it.
> After delving into this, it seems Wasmer tried, but as they weren't standards compliant, adoption/ecosystem support never followed.
You may be surprised by how much WASIX is being adopted by the ecosystem! Aiming it to be full POSIX compliant has proven incredibly powerful, as there's no need for waiting for other entities to reinvent what already works in the POSIX (macOS, Linux, ...) :)
I'm not discounting WASIX or what you guys are doing I'd love to just use wasm today for everything instead of waiting, I started this project by trying to use WASIX, I just found it quite difficult to actually develop for as many of the essential rust crates, seemed reluctant to merge your changes, and having to use dependency versions from a year ago with patches is very frustrating.
So happy to see wasi-http become stable.
Do you plan to support custom domains and SSL certificates for self-hosted Faasta deployments, or will that be handled externally via reverse proxies?
For self hosted, if you use porkbun for DNS it will automatically pull a wildcard SSL cert using the API at startup.
I plan to also support multiple custom domain certs on a multi tenanted instance like faasta.xyz. For now I'd recommend a reverse proxy though.
gotcha