Show HN: Zaplib – Speedup your web app with Rust and WASM

This page summarizes the projects mentioned and recommended in the original post on news.ycombinator.com

InfluxDB - Power Real-Time Data Analytics at Scale
Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
www.influxdata.com
featured
SaaSHub - Software Alternatives and Reviews
SaaSHub helps you find the best software and product alternatives
www.saashub.com
featured
  • webviz

    web-based visualization libraries

    Hey HN, one of the creators here! I made it at Cruise because it was super painful to develop https://webviz.io with manual memory management (lots of ArrayBuffers), WebWorkers, etc. I thought that there must be a better way.

    Very curious to hear stories from other folks building intensive stuff in the browser. How are you dealing with performance issues in Javascript? Have you tried using Rust or C++ with WebAssembly for parts of your apps? How did you make 2d/3d rendering faster? Would you want to use something like Zaplib?

  • InfluxDB

    Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.

    InfluxDB logo
  • imgui

    Dear ImGui: Bloat-free Graphical User interface for C++ with minimal dependencies

    I've been using a similar stack (C++ and WASM) to build some simple applications and I enjoy it very much. For the UI components I use Dear ImGui [0] as I am very familiar with it and it allows me to implement GUIs very fast. The biggest convenience is that you can run the same code both as a native application and as a web app. The biggest drawback is you usually get 100% CPU usage when there is an active animation in the WebGL canvas because you need to redraw everything (similar to the OP's example).

    If you are interested, checkout my Github template repo [1] - it contains a few examples:

    [0] https://github.com/ocornut/imgui

    [1] https://github.com/ggerganov/ggweb

  • ggweb

    Template for C++ GUI apps that can run in the browser

    I've been using a similar stack (C++ and WASM) to build some simple applications and I enjoy it very much. For the UI components I use Dear ImGui [0] as I am very familiar with it and it allows me to implement GUIs very fast. The biggest convenience is that you can run the same code both as a native application and as a web app. The biggest drawback is you usually get 100% CPU usage when there is an active animation in the WebGL canvas because you need to redraw everything (similar to the OP's example).

    If you are interested, checkout my Github template repo [1] - it contains a few examples:

    [0] https://github.com/ocornut/imgui

    [1] https://github.com/ggerganov/ggweb

  • glicol

    Graph-oriented live coding language and music/audio DSP library written in Rust

    Great work. Do you have any tips for debugging? I use the same combo for Glicol music programming language:

    https://glicol.org

    You can check it if you are interested.

  • vite

    Next generation frontend tooling. It's fast!

    I always encourage users to use vite, and it is quite easy for the dev server.

    https://github.com/vitejs/vite/issues/3909

    For deployment it's a different story then but for example netlify has a quite intuitive way to set headers for CORS:

    https://github.com/padenot/ringbuf.js/blob/master/public/_he...

  • ringbuf.js

    Wait-free thread-safe single-consumer single-producer ring buffer using SharedArrayBuffer

    I always encourage users to use vite, and it is quite easy for the dev server.

    https://github.com/vitejs/vite/issues/3909

    For deployment it's a different story then but for example netlify has a quite intuitive way to set headers for CORS:

    https://github.com/padenot/ringbuf.js/blob/master/public/_he...

  • yew

    Rust / Wasm framework for creating reliable and efficient web applications

    Overhead of calling into JS from Wasm is very low; DOM calls are no problem since the DOM call itself is much slower than the overhead of switching from Wasm to JS. See e.g. this article from ~4 years ago: https://hacks.mozilla.org/2018/10/calls-between-javascript-a...

    There are even some libraries that try to mimic React directly from Rust, such as https://yew.rs/ (though in my experience they can be a bit harder to use than Zaplib, since they require you to learn about traits, closures, etc, and tend to also run into borrow checker issues more often -- all of those are things we try to avoid having to learn in Zaplib!)

  • SaaSHub

    SaaSHub - Software Alternatives and Reviews. SaaSHub helps you find the best software and product alternatives

    SaaSHub logo
  • zaplib

    ⚡ Zaplib is an open-source library for speeding up web applications using Rust and WebAssembly.

    We used approach #1: https://github.com/Zaplib/zaplib/blob/7976d39775dd1642f20d8b...

    I might write a blog post about this, since it's pretty fun / tricky stuff!

  • ffi-gen

    Call rust from any language.

    Nice project, although pretty opinionated. But I guess you have to do that when targeting the crazy browser environment with all its weird quirks (at least for non-web devs)..

    Somewhat related is a library I've been working on to generate an ffi between Rust and js code: https://github.com/cloudpeers/ffi-gen

    Also I really like your universal_thread abstraction, hiding the whole web worker mess. I did a similar thing here: https://github.com/wngr/wasm-futures-executor

  • radixdb

    radix tree with fast persistence and different storage backends

    Yes, I also went with the 1st one.

    Basically the main thread sends a command to an io executor thread, and then waits on the result, which is done using atomics under the hood.

    See e.g. https://github.com/cloudpeers/radixdb/blob/sqlite/browser/sr...

    Can't wait to play with zaplib. Can you also use it as just a standard library without the GUI part?

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts

  • Show HN: Game of Life with grid editor in browser with Rust and WASM

    2 projects | news.ycombinator.com | 13 Dec 2023
  • Recreating the Apple Calculator in Rust using Tauri, Yew and Tailwind

    1 project | dev.to | 30 Nov 2023
  • Yew: Rust / WASM framework for creating reliable and efficient web applications

    1 project | news.ycombinator.com | 29 Nov 2023
  • Semantics of method which takes Rc<Self> and returns Rc<Self>?

    1 project | /r/learnrust | 14 Oct 2023
  • Crux: Cross-platform app development in Rust

    7 projects | news.ycombinator.com | 28 Sep 2023

Did you konow that Rust is
the 5th most popular programming language
based on number of metions?