Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Avoiding spelling mistakes: a WebAssembly tale

Avoiding spelling mistakes: a WebAssembly tale

An overview of WebAssembly, a brief introduction to Rust and a real world use case for using both to provide spell checking on the frontend.
Talk given at SFScon 2020.

61ba6f6b1fb82707b9344259f74a81b3?s=128

Riccardo Magliocchetti

November 14, 2020
Tweet

Transcript

  1. Avoiding spelling mistakes: Avoiding spelling mistakes: a WebAssembly tale a

    WebAssembly tale Riccardo Magliocchetti Riccardo Magliocchetti
  2. whoami whoami So ware developer @ Maieu cal Labs Consultant

    Torino Hacknight @tohacknight
  3. Avoiding spelling mistakes: Avoiding spelling mistakes: a WebAssembly tale a

    WebAssembly tale Agenda: WebAssembly Rust A real-world use case
  4. WEBASSEMBLY WEBASSEMBLY

  5. WebAssembly is a portable binary format, developed as compila on

    target. webassembly.org
  6. WebAssembly is a portable binary format, developed as compila on

    target.
  7. WebAssembly is a portable binary format, developed as compila on

    target.
  8. Working but still WIP Working but still WIP JS BigInt

    and 64 bit WASM Integer integra on, no Webkit SIMD, not enabled by default Threads and atomic opera ons, no Webkit , s ll experimental WASI Source: webassembly.org/roadmap
  9. Main features Main features Fast Safe Compute only

  10. WASM targets WASM targets Browsers: , JS Run me: ,

    WASM Run me: , 93% users WebAssembly MDN docs Node.js Deno wasm me wasmer
  11. Programming Languages Programming Languages C/C++: : C#: Other Emscripten Rust

    Working Group AssemblyScript Blazor
  12. Why WebAssembly? Why WebAssembly? Applica ons por ng to the

    Web, e.g. Reuse code in JavaScript One run me for many languages Pyodide
  13. RUST RUST

  14. Rust Rust Fast Reliable Rich ecosystem

  15. Uses of Rust Uses of Rust Systems programming Embedded Good

    integra ons with other languages: C, Python, WebAssembly :) cargo-c PyO3
  16. How to learn Rust? How to learn Rust? The book

    Italian meetups
  17. A use case A use case Add spell checking to

    a web applica on using SymSpell
  18. Problems Problems CPU intensive No available JS implementa on

  19. Solution Solution Por ng the to WebAssembly! Rust implementa on

  20. Our contributions Our contributions Op mized WebAssembly por ng More

    features Tech details: Nicola Mar no at Rustlab 2020 talk
  21. That's all folks! Any question? That's all folks! Any question?

    github.com/xrmx speakerdeck.com/xrmx @rmistaken