0.5.0 • Published 5 years ago

walt-link v0.5.0

Weekly downloads
1
License
MIT
Repository
-
Last release
5 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

5 years ago

0.4.11

5 years ago

0.4.10

5 years ago

0.4.9

5 years ago

0.4.8

6 years ago

0.4.7

6 years ago

0.4.6

6 years ago

0.4.5

6 years ago

0.4.4

6 years ago

0.4.3

6 years ago

0.4.2

6 years ago

0.4.1

6 years ago

0.4.0

6 years ago

0.3.2

6 years ago

0.3.0

6 years ago

0.2.11

6 years ago

0.2.10

6 years ago

0.2.9

6 years ago

0.2.8

6 years ago

0.2.7

6 years ago

0.2.6

6 years ago

0.2.5

6 years ago

0.2.4

6 years ago

0.2.3

6 years ago

0.2.2

6 years ago

0.2.1

6 years ago

0.1.6

6 years ago

0.1.5

6 years ago

0.1.4

6 years ago

0.2.0

6 years ago