git ssb

0+

wanderer🌟 / js-primea-wasm-container



Commit 13dae27ceeb5fe7023f74c8ba13a8c3c1ac3ecfd

update readme

Signed-off-by: wanderer <mjbecze@gmail.com>
wanderer committed on 10/22/2017, 9:22:27 PM
Parent: b0681a5e23f163393ec4b946ea5f4466dcf34e9f

Files changed

README.mdchanged
README.mdView
@@ -3,13 +3,31 @@
33 [![Coverage Status](https://img.shields.io/coveralls/primea/js-primea-wasm-container.svg?style=flat-square)](https://coveralls.io/primea/js-primea-wasm-container)
44
55 [![js-standard-style](https://cdn.rawgit.com/feross/standard/master/badge.svg)](https://github.com/feross/standard)
66
7-# install
8-`npm install primea-wasm-container`
9-
107 # SYNOPSIS
118 This implements a wasm container for the ewasm-kernel
129
10 +# INSTALL
11 +`npm install primea-wasm-container`
1312
13 +# USAGE
14 +```
15 +const WasmContainer = require('primea-wasm-container')
16 +
17 +// this class with get instantiated when a new wasm container instance is created
18 +// its methods with be exposed to the wasm binary as `imports`
19 +class HelloWorld {
20 + test () {
21 + console.log('hello world!')
22 + }
23 +}
24 +
25 +// regester the container with the a hypervisor instance
26 +hypervisor.registerContainer(WasmContainer, {
27 + env: HelloWorld
28 +})
29 +
30 +```
31 +
1432 # LICENSE
1533 [MPL-2.0](https://tldrlegal.com/license/mozilla-public-license-2.0-(mpl-2))

Built with git-ssb-web