Dister builds and bundles your wasm web app.

Related tags

WebAssembly dister
Overview

dister

Dister builds and bundles your wasm web app.

Installation

cargo install dister

Requirements

  • wasm32-unknown-unknown target:

rustup target add wasm32-unknown-unknown

  • Wasm-bindgen:

cargo install wasm-bindgen-cli

  • Miniserve (optional, to serve the outputted html file when using dister serve):

cargo install miniserve

  • Wasm-opt (optional, wasm-opt is called if found in PATH and the --release flag is passed to dister build).

It can be downloaded from the binaryen repo's releases.

Usage

USAGE:
    dister <SUBCOMMAND>

SUBCOMMANDS:
    build     Build your wasm web app
    clean     Clean output artifacts
    serve     Serve the generated index.html
    --help    Prints this message or the help of the given subcommand(s)

From the manifest directory of your wasm rust applications directory, run: dister build or dister build --release

It should generate a dist folder in the manifest directory. The generated html index file can then be served by any server or by running dister serve. If you prefer to use another server for development, pass the dist directory to the server: python3 -m http.server --dir dist

If dister finds an index.html shell in the manifest directory, it will use it and replace the {{SCRIPT}} placeholder (à la emscripten shell html) with a script to load the generated js glue code.

<html>
  <head>
  <meta charset="utf-8">
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  </head>
  <body>
    {{SCRIPT}}
  </body>
</html>
You might also like...
Synchronization primitives for both web and native.

wasm_sync wasm_sync offers synchronization primitives that work in both browser and native contexts. In web browsers, use of atomic wait instructions

A Cargo subcommand for the client-side Web
A Cargo subcommand for the client-side Web

A cargo subcommand for the client-side Web This cargo subcommand aims to make it easy and convenient to build, develop and deploy client-side Web appl

A standard library for the client-side Web
A standard library for the client-side Web

A standard library for the client-side Web The goal of this crate is to provide Rust bindings to the Web APIs and to allow a high degree of interopera

A Rust ESP stack trace decoder that can also runs in your browser thanks to WebAssembly
A Rust ESP stack trace decoder that can also runs in your browser thanks to WebAssembly

ESP Stack Trace Decoder A Rust ESP stack trace decoder that can also runs in your browser thanks to WebAssembly. It is composed of a ⌨️ Rust library,

Client for integrating private analytics in fast and reliable libraries and apps using Rust and WebAssembly

TelemetryDeck Client Client for integrating private analytics in fast and reliable libraries and apps using Rust and WebAssembly The library provides

Let's combine wasi-nn and witx-bindgen and see how it goes!

WASI-NN Experiment (API Docs) Experiments with wasmtime, the wasi-nn proposal, and tract. Getting Started To use this experiment, you will first need

Lumen - A new compiler and runtime for BEAM languages

An alternative BEAM implementation, designed for WebAssembly

🚀Wasmer is a fast and secure WebAssembly runtime that enables super lightweight containers to run anywhere
🚀Wasmer is a fast and secure WebAssembly runtime that enables super lightweight containers to run anywhere

Wasmer is a fast and secure WebAssembly runtime that enables super lightweight containers to run anywhere: from Desktop to the Cloud, Edge and IoT devices.

A high-performance, secure, extensible, and OCI-complaint JavaScript runtime for WasmEdge.

Run JavaScript in WebAssembly Now supporting wasmedge socket for HTTP requests and Tensorflow in JavaScript programs! Prerequisites Install Rust and w

Owner
Mohammed Alyousef
MD.
Mohammed Alyousef
wasmy, easily customize my wasm app

wasmy wasmy, easily customize my wasm app! features Completely shield vm-wasm interaction details Simple and flexible ABI, supports freely adding vm a

henrylee2cn 21 Jul 22, 2022
Autogenerated async RPC bindings that instantly connect a JS frontend to a Rust backend service via WebSockets and WASM.

Turbocharger Autogenerated async RPC bindings that instantly connect a JS frontend to a Rust backend service via WebSockets and WASM. See https://gith

null 28 Jan 2, 2023
A template for kick starting a Rust and WebAssembly project using wasm-pack.

A template for kick starting a Rust and WebAssembly project using wasm-pack.

Haoxi Tan 1 Feb 14, 2022
{Wasm+Rust} Build and animate Conway's Game of Life

A self-guided learning project that includes Rust + Wasm together. Who knows, maybe Typescript and React joins too..

M.Yavuz Yagis 1 Feb 14, 2022
Wasm runtime written in Rust

Wasm runtime written in Rust

Teppei Fukuda 1 Oct 29, 2021
The Wasm-Enabled, Elfin Allocator

wee_alloc The Wasm-Enabled, Elfin Allocator API Docs | Contributing | Chat Built with ?? ?? by The Rust and WebAssembly Working Group About wee_alloc:

Rust and WebAssembly 567 Dec 28, 2022
Example app & project structure for Golem Cloud

Synopsis This project serves as an example/template for building an application using WebAssembly Component Model (and in this case, an app for Ziverg

Terry L 5 Aug 4, 2023
A console and web-based Gomoku written in Rust and WebAssembly

?? rust-gomoku A console and web-based Gomoku written in Rust and WebAssembly Getting started with cargo & npm Install required program, run # install

namkyu1999 2 Jan 4, 2022
darkforest is a console and web-based Roguelike written in Rust and WebAssembly.

darkforest darkforest is a console and web-based Roguelike written in Rust and WebAssembly. Key Features TBA Quick Start TBA How To Contribute Contrib

Chris Ohk 5 Oct 5, 2021
Zaplib is an open-source library for speeding up web applications using Rust and WebAssembly.

⚡ Zaplib Zaplib is an open-source library for speeding up web applications using Rust and WebAssembly. It lets you write high-performance code in Rust

Zaplib 1.2k Jan 5, 2023