1.0.0 • Published 3 years ago

vasm v1.0.0

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

Why Vasm?

Vasm takes everything great about Vue and takes it to the WebAssembly realm. Using AssemblyScript, components/state/pages can be written to be high performing while being written in a language that is familiar to JavaScript developers. Furthermore, external Vue.js components can be hooked into Vasm, opening up the enormous Vue ecosystem to the power of WebAssembly.

Example

Vasm is similair to Vue.js in syntax (Although due to its low level, certain aspects require extra steps). Example of a simple button counter.

import { Vasm } from 'vasm';
import { Map } from 'map';

Vasm.Component("App", Vasm.Options()
    .template(`
        <div>
            <button :click="counter:i32++">
                Clicked the button {{ counter }} times.
            </button>
        </div>
    `)
    .data( (instance: Pointer<Instance>, data: Pointer<Data>) : void => {

        // The data object is passed as a pointer.
        of(data).set("counter", 0);

    })
);