0.5.0 • Published 6 years ago

walt-link v0.5.0

Weekly downloads
1
License
MIT
Repository
-
Last release
6 years ago

walt-link

Linker for walt WebAssembly Programs.

About

Wraps .walt file with a JavaScript module, with all the dependencies linked.

Intented to be used in a node environment. Not yet implemented in a loader.

Still under development, but the API wont change.

Notes

  • Any import with a leading dot(.) will be linked into the final binary
  • Anything without a leading dot(.) will be treated as an environment import and is left up to the user to implement.
  • The top-level function returns a factory method which returns a function taking an import object. Every call to the method returns a brand new module
  • importObj used in the factory method is shared accross all modules.
  • Walt Dependencies are shared within a single WebAssembly module instance. Each import is a stand alone module linked by the linker. This is useful if you want shared module state across imports, similar to node modules.

TODOs

-

Usage

const { link } = require("walt-link");
const path = require("path");

const factory = link(path.resolve(__dirname, "./index.walt"));

factory({
  env: {
    memory,
  },
}).then(wasmModule => {
  /* run your code here */
});
0.5.0

6 years ago

0.4.11

6 years ago

0.4.10

7 years ago

0.4.9

7 years ago

0.4.8

7 years ago

0.4.7

7 years ago

0.4.6

7 years ago

0.4.5

7 years ago

0.4.4

7 years ago

0.4.3

7 years ago

0.4.2

7 years ago

0.4.1

7 years ago

0.4.0

7 years ago

0.3.2

7 years ago

0.3.0

7 years ago

0.2.11

7 years ago

0.2.10

7 years ago

0.2.9

7 years ago

0.2.8

7 years ago

0.2.7

7 years ago

0.2.6

7 years ago

0.2.5

7 years ago

0.2.4

7 years ago

0.2.3

7 years ago

0.2.2

7 years ago

0.2.1

7 years ago

0.1.6

7 years ago

0.1.5

7 years ago

0.1.4

7 years ago

0.2.0

7 years ago