There are certain use cases where JavaScript is not performant enough. But fortunately, JavaScript is no longer the only language that runs in the browser. WebAssembly (Wasm) is a technology that can revolutionize how we build apps for the web browser.
Take the example of eBay. Just last year, the online marketplace revealed how it improved the performance of a demanding web app by 50x using WebAssembly. In certain use cases where performance demands are high, WebAssembly surpasses JavaScript in terms of loading time, execution speed, memory usage, debugging, portability and more.
Using WebAssembly with Rust, especially for backend development, is even better as it is memory safe and ships with an extremely minimal runtime.
This webinar introduces you to the concept of WebAssembly and the Rust programming language along with a hands-on example of using both these technologies in practice.
2. About Knoldus
Knoldus is a technology consulting firm with focus on modernizing the digital systems
at the pace your business demands.
DevOps
Functional. Reactive. Cloud Native
3. Quick introduction to Rust
WebAssembly
WebAssembly Architecture
Hands on example
How and where you should use WASM
Our Agenda
01
02
03
04
05
4. Rust programming language
Rust is a multi-paradigm system programming language that can
provide better memory safety while maintaining high performance. It
runs blazingly fast, prevents almost all crashes, and eliminates data
races. It has an exceptional feature of memory management which can
be achieved by the Ownership Concept.
5. Features of Rust
❖ Fix common memory safety problems.
➢ Memory safety.
■ Ownership and Borrowing
➢ Rust safety.
■ Single Mutable multiple immutable
■ No NULL only OPTION.
❖ Performance.
❖ Portability.
❖ Stability.
7. Large Projects Using Rust as development
❖ Amazon Firecracker.
❖ Windows Runtime.
❖ One Signal.
❖ NPM.
❖ Azure IOT.
❖ Discord.
❖ Oxidation.
❖ Firefox Quantum.
❖ CloudFlare.
9. Web Development Today
● Browser
Compatibility
● Disparate build
environment
● TypeScript,
JavaScript,
CoffeeScript,
X-to-JS
CodeGen.
As SPA’s gets better
and more powerful, gets
everything gets slower.
● Slow builds.
● Bloated
Frameworks.
● Code Performance.
● Browser Issues.
● An infinite number
of ways to solve
every problem.
● Too many libraries,
too much to learn
node_module
directory is a meme.
● Rapid ecosystem
change.
Fragmented Slow Overwhelming
10. WebAssembly
❏ Portable and Standardized binary format of stack machine instructions..
❏ Safe and Isolated execution and memory.
❏ Supported by all modern web browsers.
❏ Compile to WASM from any supported language
❏ C, C++
❏ Go
❏ Rust
❏ Interpret in Many languages:
❏ JavaScript
❏ Go
❏ Rust
❏ Node
❏ C, C++
11. Efficient and Fast
WebAssembly aims to execute at
native speed by taking advantage
of common hardware capabilities
available on a wide range of
platforms.
01
Open and debuggable
WebAssembly is designed to be
pretty-printed in a textual format for
debugging, testing, experimenting,
optimizing, learning, teaching, and
writing programs by hand.
03
Safe
WebAssembly describes a
memory-safe, sandboxed execution
environment that may even be
implemented inside existing
JavaScript virtual machines.
02
Open web platform
WebAssembly is designed to
maintain the versionless,
feature-tested, and
backwards-compatible nature of
the web.
04
WebAssembly features
16. How WebAssembly Will Change the Way To Develop Web Applications?
❏ Compatible with All Major Operating Systems and Web Browsers.
❏ Offers Programming Language Choice to Developers.
❏ Provides Better Load Time to Web Applications.
❏ Ensures Secure Experience to Users.
17. Where You Should Use WebAssembly?
❏ Heavy applications.
❏ High Performance.
❏ Near Native speed.