0.1.0-alpha.5 • Published 7 years ago

stasis v0.1.0-alpha.5

Weekly downloads
5
License
MIT
Repository
github
Last release
7 years ago

Stasis

The Stasis runtime. This module exports a default function that accepts a URL to your WebAssembly binary. For more details on creating this binary, visit the github repo.

import load from 'stasis'

load('/_/app.wasm')
  .then(() => {
    console.log('The main function in app.wasm has finished running.')
  })

I don't need any javascript code

This package also provides a minified bundle which can automatically run this step for you. All this requires is a minimal html document:

<!DOCTYPE html>
<html>
    <head>
        <script
            id="stasis"
            src="http://bundle.run/stasis@0.1.0-alpha.5/dist/stasis.min.js"
            type="text/javascript"
            data-binary="THE_URL_TO_YOUR_BINARY_GOES_HERE"
        ></script>
    </head>
    <body></body>
</html>

Simply replace THE_URL_TO_YOUR_BINARY_GOES_HERE with the URL of your binary, and open the HTML file. On Chrome, the file must be served via a webserver or else the loader will receive an error. On Firefox, you can open the file directly without a webserver.

0.1.0-alpha.5

7 years ago

0.1.0-alpha.4

7 years ago

0.1.0-alpha.3

7 years ago

0.1.0-alpha.2

7 years ago

0.1.0-alpha.1

7 years ago

0.1.0-alpha

7 years ago

0.0.13

7 years ago

0.0.12

11 years ago

0.0.11

11 years ago

0.0.10

11 years ago

0.0.9

11 years ago

0.0.8

11 years ago

0.0.7

11 years ago

0.0.6

11 years ago