New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

emcc

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

emcc

A simple c-compiler caller for node

latest
Source
npmnpm
Version
0.2.2
Version published
Maintainers
1
Created
Source

node-emcc

A simple Emscripten downloader and runner library for node.

Usage

Make sure you have all dependencies listed at http://kripken.github.io/emscripten-site/docs/getting_started/downloads.html#platform-specific-notes

npm install --save-dev emcc

const path = require('path');
const emcc = require('emcc');

const inputFile = path.join(__dirname, 'src', 'test.c');
const outputFile = path.join(__dirname, 'out', 'test.js');

// Create output directory if it does not exist
require('mkdirp').sync(path.dirname(outputFile));

// Run the emscripten compiler
emcc(`-s WASM=1 ${inputFile} -o ${outputFile}`, (err, stdout, stderr) => {
    // If there is an error, throw it
    if (err != null || stderr.trim() != '') {
        console.error(stderr);
        throw err;
    }

    // Log the compiler output
    console.log(stdout);
});

License

MIT License. See LICENSE file.

Keywords

emscripten

FAQs

Package last updated on 26 Dec 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts