“Any application that can be written in JavaScript, will eventually be written in JavaScript.” — Jeff Atwood, Cofounder of StackOverflow
“Atwood’s Law” is driven by the idea that all applications will ultimately wind up on the web and therefore must be written in JavaScript. WebAssembly may be your way out! With WebAssembly, you can write in nearly any modern language and run your code in the browser through a memory-safe, sandboxed execution environment that can be embedded in a web browser and other platforms. Getting set up and moving with WebAssembly requires you to modify your web dev process; WebAssembly in Action will get you started quickly and guide you through real-world examples and detailed diagrams that help you create, run, and debug WebAssembly modules.
WebAssembly in Action introduces the WebAssembly stack and walks you through the process of writing and running browser-based applications. Expert developer Gerard Gallant gives you a firm foundation of the structure of a module, HTML basics, JavaScript Promises, and the WebAssembly JavaScript API. After building simple modules, you’ll delve deeper into dynamic linking of multiple modules at runtime, working with NodeJS modules, building modules with C/C++ and the Emscripten toolkit, and running a UI-independent thread with an HTML5 web worker.
To ensure your code is error-free, you’ll also learn about WebAssembly Text Format, which is vital for debugging. You’ll reinforce your learning with real-world examples and get a glimpse of features-to-come, including host bindings and garbage collection. WebAssembly makes it possible to create apps for online video gaming, image and video editing, virtual reality, peer-to-peer collaboration, music streaming, and many more without adjusting to the idiosyncrasies of JavaScript. This well-rounded tutorial is your ticket!
what's inside
● The WebAssembly format
● Dynamic linking of multiple modules at runtime
● Communicating between modules and JavaScript
● Debugging modules
● Unreleased features like host bindings and garbage collection!
1 有用 heisen 2022-02-09 22:50:13
webassembly在这本书里面讲的还太浅了点,其实webassembly的可能性比这个大很多。。 比如从infra的架构来说演化是从spring之类的MVC到istio, dapr之类的把服务逻辑和infra逻辑解耦的微服务, 以后甚至有可能把webassembly封装成类似spring的框架以后,写代码就直接用wasm把服务逻辑组装下就好了,彻底解决部署,性能,安全,观测等一系列的问题,这一... webassembly在这本书里面讲的还太浅了点,其实webassembly的可能性比这个大很多。。 比如从infra的架构来说演化是从spring之类的MVC到istio, dapr之类的把服务逻辑和infra逻辑解耦的微服务, 以后甚至有可能把webassembly封装成类似spring的框架以后,写代码就直接用wasm把服务逻辑组装下就好了,彻底解决部署,性能,安全,观测等一系列的问题,这一部分也是现在正在逐渐落地的方向,比如krustlet? (展开)