gulp-wasm
TypeScript icon, indicating that this package has built-in type declarations

1.0.5 • Public • Published

gulp-wasm

gulp-wasm is a gulp plugin to automates building wasm files from c and c++ files.

NPM

Usage

gulp-wasm provide a simple method for building wasm files from c and c++ files.

const gulp = require("gulp");
const buildWasm = require("gulp-wasm");

gulp.task("build-wasm", function () {
  return gulp.src(["./c_cpp/**/*.c", "./c_cpp/**/*.cpp"]).pipe(
    buildWasm({
      optimize: true,
      quiet: true,
    })
  );
});

Options

key type description
debug boolean Prints debug information to stderr.
quiet boolean Suppresses informatory output.

Module configuration:

key description
optimize Optimizes the output file and removes dead code
stack Specifies the stack size. Defaults to 10000
main Executes the specified function on load
define Defines a macro

Includes and libraries:

key description
headers Includes C headers from the specified directories
include Includes the specified source files
link Links in the specified libraries after compilation
bare Does not include the runtime library

Support

Please open an issue for support.

Contributing

Please contribute using Github Flow. Create a branch, add commits, and open a pull request.

License

MIT License

/gulp-wasm/

    Package Sidebar

    Install

    npm i gulp-wasm

    Weekly Downloads

    5

    Version

    1.0.5

    License

    MIT

    Unpacked Size

    6.17 kB

    Total Files

    5

    Last publish

    Collaborators

    • anishroy