#write #become #javascript #inlined

app wird

Write Javascript with inlined Rust that will later become Wasm

1 unstable release

0.1.0 Apr 10, 2022

#745 in WebAssembly

MIT license

28KB
809 lines

Wird

Wird allows to write Javascript with inlined Rust that will later become Wasm

Usage

You can inline Rust using #{...}; syntax, inside these you can define functions, structs, etc.
Expressions are also allowed by annotating the return type #{...} -> T;, they can capture Js variables by annotating which variables are captured along with their type #[a: A, b: B]{...} -> T;
NOTE: in order to export function to Js you have to add #[wasm] to it and make it pub
Check out examples

After writing code you can compile it using wird:
wird expand index.js

You can also quickly host your files with wird host

Prerequisites

  • cargo and then you can get the following via cargo install
  • wasm-pack
  • http-server

Download

cargo install wird

Work in progress

This is still very incomplete, and shouldn't be used in production yet

No runtime deps

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy