Summary
Web technology has evolved to allow web browsers to run a universal binary format for a virtual machine. Web browsers can now run a binary generated by the Rust compiler.
In this chapter, we have looked at an overview of WebAssembly, and how to prepare the Rust compiler to compile to WebAssembly. We also learned how to set up a Cargo workspace to have more than one application in a single directory.
We then learned how to write a simple frontend application that loads the User
data from the our_application
API endpoint that we created earlier using Yew and other Rust libraries.
Finally, we finished with how to serve the generated WebAssembly and JavaScript in the our_application
web server.
The next chapter is the final chapter, and we're going to see how we can expand the Rocket application and find alternatives to it.