Skip to content

A web service worker implementation using wasm_bindgen. This is a proof of concept using rust to initialize and manage a service worker

Notifications You must be signed in to change notification settings

justinrubek/wasm-bindgen-service-worker

Repository files navigation

wasm-bindgen-service-worker

This is an example implementation of a service-worker written in Rust and ran using wasm-bindgen and some utility functions for working with the worker. This allows for usage of service workers in a browser context with a minimal amount of JavaScript.

The worker crate contains a service worker that will listen to messages and log them to the console. The loader crate contains functions which can be used to register a service worker with the browser.

usage

You can follow wasm-bindgen's Without a Bundler example to see how to run these in the browser. There are nix flake packages for each of these components that can help deduce the build steps. See flake-parts/cargo.nix to see how they are built.

About

A web service worker implementation using wasm_bindgen. This is a proof of concept using rust to initialize and manage a service worker

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published