Wasmer 4.1 is out! Epoll, new browser login and more 🎉
Founder & CEO
July 17, 2023
Epoll! Epoll! Epoll! Epoll! 🎉
You can guess, we’re excited, really excited. Excited for epoll
!
poll_oneoff
🔫 )--mapdir
and stability improvements)You can install Wasmer 4.1 right now:
$ curl https://get.wasmer.io -sSfL | sh
Are you Readyyyy !!!
Start your Runtime 🏎️
Let’s GOOOOOOO
This release of Wasmer Runtime 4.1 is more horizonal than vertical which focuses on improving stability & bug fixes but also introduces new and improved features in the runtime such as implementation of epoll
syscall in our runtime and our new login flow. These features compliment the WASIX and the Edge ecosystem with improved async performance.
epoll
syscall which makes asynchronous I/O faster which allows for more optimal execution times.cfg_doc
feature is enabled on all crates so API docs for things behind a feature flag get a useful "Available on crate feature fs only" annotation--mapdir
issues of mapping a host’s directory to guest is now fixed as paths are now canoncalized. Commands such as
$ wasmer run php.wasm --mapdir=.:.
work as expected and improves DX a lot as users needed to paste in complete paths.What is Epoll?
epoll
is a variant of poll
available in the Linux kernel, designed to be more efficient when dealing with large numbers of file descriptors. Unlike poll
, which scans through all file descriptors each time it is called, epoll
uses an event-driven approach. It maintains a "watch list" of file descriptors, and only those that have changed status since the last call will be returned to the user.
Before 4.1, we used the poll_oneoff
syscall for non-blocking operations such as networking, file system access, etc. This meant that we had to fork mio
to use the poll_oneoff syscall but found limitations with inconsistencies on how POSIX implements poll and how WASI specified poll_oneoff
. By implementing the much more scalable epoll
syscall this allows for a consistent implementation that matches closer to POSIX without hurting WASI backwards compatibility which WASIX is committed to retain.
Tokio natively implements async I/O using
epoll
.
poll_oneoff
?mio
which uses epoll
- a more direct mapping has less failure pathsepoll
improves?epoll
and for poll_oneoff
which indirectly benefited through refactoringNote: The
poll_oneoff
syscall is still available in the runtime andepoll
is optional addition but provides a much more scalable and performant solution.
Okay, enough of the talk, let’s see some numbers.
As we see above, epoll
is much more performant than poll_oneoff
and scales better as the number of concurrent requests increase.
💡 TLS is now available in WASIX. Client libraries such as reqwest, hyper, etc. will work as expected. This was made possible by compiling ring and rustls with WASIX. Paired with our new
epoll
we’re just imagining the possibilities. But this deserves a blog post of its own… stay tuned!
Wasmer’s new login flow enables users to login to wasmer-cli using the browser creating a seamless experience which requires no manual token creation. While still respecting the previous login flows using pasting a token or using the --no-browser
flag for a CI.
Now wasmer-cli offers these 2 methods to login:
wasmer login <token>
token method (still useful for CI workloads)ℹ️ You can use
--no-browser
flag for CI runs
PHP compiled to WASIX now supports using the builtin webserver to serve PHP. This is a huge improvement for PHP developers as they can now run PHP servers with sqlite support. Before you'd have to use a custom WCGI server to run PHP.
The PHP package is available here
epoll
syscall--mapdir
Epollllllll 🎉
Syrus Akbary is an enterpreneur and programmer. Specifically known for his contributions to the field of WebAssembly. He is the Founder and CEO of Wasmer, an innovative company that focuses on creating developer tools and infrastructure for running WebAss
Founder & CEO
engineeringwasmer runtimewasmerruntimeperformance
Arshia GhafooriSeptember 7, 2023
runtimeengineeringwasmer runtime
Syrus AkbaryFebruary 28, 2022