Group Details Private


Member List

  • A Tiny, Static, Full-Text Search Engine using Rust and WebAssembly

    I looked into a few Rust libraries (crates) that implement Bloom filters.

    First, I tried jedisct1's rust-bloom-filter, but the types didn't implement Serialize/Deserialize. This meant that I could not store my generated Bloom filters inside the binary and load them from the client-side.

    After trying a few others, I found the cuckoofilter crate, which supported serialization. The behavior is similar to Bloom filters, but if you're interested in the differences, you can look at this summary.

    **Read the full article: **

    posted in Topics
  • WebAssembly Without Boilerplate

    You want to learn WebAssembly (WASM) for coding web apps in [replace by your favorite language] instead of Javascript (because you h*te it!) and are not interested by the WebAssembly Text Format (WAT) : THIS EBOOK IS NOT FOR YOU !
    Indeed, there’re already many great tutorials about the amazing Emscripten project - the main door to discover WASM - in order to enter new realms of web development without javascript and capitalizing on existing code bases written in C/C++/Rust/[your language].
    Else you know javascript but not very well (use it just for jQuery plugins) : THIS EBOOK IS VERY PROBABLY NOT FOR YOU !

    Else you love modern frontend technologies and practices, and use them to develop web apps offering to your users experiences similar to native ones :
    snappy UI;
    damn fast loading time;
    offline mode;
    nearly no waiting time or UI freezing during information processing.

    Concretely, you’re familiar with the actions below to reach these goals :
    writing modern CSS / SVG to manage as much animations as possible and hence offload the javascript thread;
    using tiny yet powerful frameworks (ex: Preat, Redux, StencilJs, Svelte…);
    harnessing the Cache and Service Worker APIs (look for Progressive Web Apps) for offline applications;
    following good javascript practices :
    avoiding DOM accesses (relatively slow) when not absolutely necessary;
    using async patterns (Promises, generators) properly;
    not declaring new local variables in frequently called functions to avoid too much triggering of the garbage collector (=> temporary UI freezes);
    using native ES6 methods when your application target modern browsers;
    using Web Workers - to create additional threads - if some tasks can be executed in parallel;
    using WebGL to speed up drawings, or heavy operations (scientific libraries, artificial intelligence...).

    Still, your application has some bottlenecks. You’ve heard about the WebAssembly revolution, but the situation is not severe enough to rewrite the whole app from scratch in C++ or Rust - that you don’t know. Indeed, your bundle size is not very big, and instead the problem lies in a dozen of slow functions. Moreover, you want to experiment with the WASM technology without learning lots of tools. Above all, you want clear and succinct explanations but less dry than the official documentation. THIS BOOK IS PROBABLY FOR YOU! Indeed, each chapter show practical examples, that you can test in a few seconds by copying and pasting them into your browser console. Also, code samples are littered with detailed comments! For prerequisites, please check Appendix A.0.

    The book:

    posted in Books
  • Google Earth In The Browser With WebAssembly

    So what did the conversion involve? Earth is a C++ application and the faithful Emscripten compiler did the work of converting it to WebAssembly. This is far from just a translation of the C++ to WebAssembly. The compiler also has to convert POSIX calls to something that works in a browser. It also converts OpenGL calls into WebGL. At the end of the day you still need to do some manual work to get the code working correctly.

    The Google blog post also suggests what might be next for WebAssembly:

    SIMD support
    Dynamic linking
    Better debugging

    posted in Topics
  • Learn Rust Free book

    Affectionately nicknamed “the book,” The Rust Programming Language will give you an overview of the language from first principles. You’ll build a few projects along the way, and by the end, you’ll have a solid grasp of the language.

    posted in Books
  • Google IO: WebAssembly for Web Developers

    WebAssembly is often hailed as a performance tool for critical tasks or to bring existing C++ code bases to the web – such as games. But WebAssembly is so much more. You can use WebAssembly as a puzzle piece to give the web platform the few missing capability that you are missing or to surgically replace a JavaScript bottleneck.

    Youtube Video

    posted in Topics
  • 🐘+🦀+🕸 php-ext-wasm: Migrating from wasmi to Wasmer

    How php-ext-wasm has migrated from wasmi to Wasmer and now enjoys a 29x speedup, is faster than PHP itself, and is closer to native speed.

    The PHP virtual machine (VM) is Zend Engine. To write an extension, one needs to develop in C or C++. The extension was simple C bindings to a Rust library I also wrote. At that time, this Rust library was using wasmi for the WebAssembly VM. I knew that wasmi wasn’t the fastest WebAssembly VM in the game, but the API is solid, well-tested, it compiles quickly, and is easy to hack. All the requirements to start a project!

    Read the article:

    posted in Topics
  • Programming using Web Assembly

    As I described in a previous post, Web Assembly is intended as a target language for compilers, not as a general-purpose language for programmers. In other words, you’re not supposed to write programs in Web Assembly itself but instead write in a higher-level language then compile it into Web Assembly.

    I first met assembly languages on 8-bit microcomputers where they were used to write software that ran as fast as possible on what was by modern standards very slow hardware.

    Even though Web Assembly is not intended as an application programming language, I wanted to have a go at programming with it, so I coded a simple module that calculates the Mandelbrot Set to be rendered on an HTML canvas.

    Read the article:

    posted in Topics
  • Announcing WAPM: The WebAssembly Package Manager

    Today, we are releasing a new tool that will help you use WebAssembly anywhere: WAPM (aka WebAssembly Package Manager).

    This release includes:

    A command line application: wapm, included when you install Wasmer
    A website and package registry:

    Read the article:

    posted in Announcements
  • RE: How can i set the imported memory to accept shared memory in clang

    @K0IN Glad to hear!

    posted in WASM Overflow
  • String manipulation — WebAssembly

    In this story, I will talk about the approach I took to understand WebAssembly and how I took a first stab by building a simple string concatenation library function in C++, compiled it to WASM(WebAsSeMbly) and imported it as a JavaScript module and ran it using NodeJS.

    Read the article:

    posted in Topics