{"id":27099318,"url":"https://github.com/devappd/emscripten-build","last_synced_at":"2026-04-29T22:43:20.757Z","repository":{"id":57224999,"uuid":"324271609","full_name":"devappd/emscripten-build","owner":"devappd","description":"Build a C++ WebAssembly program inside your Node.js packaging workflow.","archived":false,"fork":false,"pushed_at":"2021-08-17T06:43:50.000Z","size":214,"stargazers_count":0,"open_issues_count":6,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-15T19:37:17.425Z","etag":null,"topics":["cmake","emscripten","emscripten-sdk","emsdk","ninja","nodejs","npm","wasm","webassembly"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/emscripten-build","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/devappd.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-12-25T02:25:00.000Z","updated_at":"2021-01-14T14:14:24.000Z","dependencies_parsed_at":"2022-09-06T13:40:12.570Z","dependency_job_id":null,"html_url":"https://github.com/devappd/emscripten-build","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devappd%2Femscripten-build","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devappd%2Femscripten-build/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devappd%2Femscripten-build/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devappd%2Femscripten-build/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/devappd","download_url":"https://codeload.github.com/devappd/emscripten-build/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247479092,"owners_count":20945403,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cmake","emscripten","emscripten-sdk","emsdk","ninja","nodejs","npm","wasm","webassembly"],"created_at":"2025-04-06T12:20:25.829Z","updated_at":"2025-10-05T22:32:22.697Z","avatar_url":"https://github.com/devappd.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# emscripten-build\n\n[![e2e-test](https://github.com/devappd/emscripten-build-npm/workflows/e2e-test/badge.svg)](https://github.com/devappd/emscripten-build-npm/actions?query=workflow%3Ae2e-test) [![emscripten-build](https://img.shields.io/npm/v/emscripten-build)](https://www.npmjs.com/package/emscripten-build) [![mit-license](https://img.shields.io/github/license/devappd/emscripten-build-npm?color=yellow)](https://github.com/devappd/emscripten-build-npm/blob/master/LICENSE)\n\nBuild your C++ WebAssembly project inside your Node.js build workflow.\n\nThis package uses the [Emscripten SDK](https://emscripten.org/) to compile your C++ to WebAssembly. It\nprovides a command line and a JS interface that allows you to configure your builds and integrate your\nWASM project into your packaging scripts.\n\n## How to Use\n\nThis package assumes that you have a C/C++ project that can build with Emscripten via a Makefile. The recommended usage is to run builds with [CMake](https://cmake.org) and [Ninja](https://ninja-build.org). Support also exists for [GNU Make](https://www.gnu.org/software/make/manual/make.html) and [Autotools](https://www.gnu.org/software/automake/manual/html_node/index.html).\n\nBuilding can be made as simple as switching to your project directory and entering in the command line:\n\n```sh\nnpx emscripten --configure --build\n```\n\nor invoking from JavaScript:\n\n```js\nconst emscripten = import('emscripten-build');\n\nemscripten.configure()\n    .then((em) =\u003e em.build())\n    .then((em) =\u003e { /* ... */ });\n```\n\nBuilds are configured by placing `emscripten.settings.js` in your project root. Here is a simple\nsettings file for a CMake project:\n\n```js\nmodule.exports = {\n    myProject: {\n        type: \"cmake\",\n\n        configure: {\n            path: \"./src\",\n            generator: \"Ninja\",\n            type: \"Release\",\n            definitions: {\n                DEFINE1: \"Value1\"\n            }\n        },\n\n        build: {\n            path: \"./build\"\n        },\n\n        install: {\n            path: \"./dist\"\n        }\n    }\n};\n```\n\nSee the end of this document for detailed guides.\n\n## Install\n\n```sh\nnpm install --save-dev emscripten-build\n```\n\nBefore you install this package, you must install Python 3.6+ on your system. You may download it at [python.org](https://www.python.org/downloads/) or your OS's package manager.\n\nBy default, the Emscripten SDK is installed into your `node_modules` tree. You may specify a custom path by\n[modifying your NPM config](https://docs.npmjs.com/cli/v6/using-npm/config) via one of the commands below. Do this **before** you install the package:\n\n|Action|Command\n|------|-------\n| Save the path to your project `.npmrc` | `npm config --userconfig \"/your/project/root/.npmrc\" set emsdk \"/your/absolute/custom/path\"`\n| Save the path to your user `.npmrc` | `npm config set emsdk \"/your/absolute/custom/path\"`\n| Set an environment variable | `set NPM_CONFIG_EMSDK=/your/absolute/custom/path`\n| Use a config argument to NPM temporarily | `npm [command] --emsdk=\"/your/absolute/custom/path\"`\n\nThe [Emscripten SDK](https://www.npmjs.com/package/emscripten-sdk), [CMake](https://www.npmjs.com/package/@devappd/cmake-binaries), and [Ninja](https://www.npmjs.com/package/@devappd/ninja-binaries-npm) programs are installed as NPM dependencies.\n\n## See Also\n\nFor detailed information on how to use this package, see these guides:\n\n* [Installation](https://github.com/devappd/emscripten-build-npm/blob/main/docs/Installation.md)\n* [Build Settings and Basic Usage](https://github.com/devappd/emscripten-build-npm/blob/main/docs/Build-Settings.md)\n* [Command Line](https://github.com/devappd/emscripten-build-npm/blob/main/docs/Command-Line-Usage.md)\n* [JavaScript API](https://github.com/devappd/emscripten-build-npm/blob/main/docs/Javascript-API.md)\n\nVisit this repository to see different examples on how to use this package:\n\n* [emscripten-npm-examples](https://github.com/devappd/emscripten-npm-examples) -- Contains \"Hello World\" examples, an OpenGL demo, and a library project.\n\n## License\n\nMIT License.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevappd%2Femscripten-build","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdevappd%2Femscripten-build","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevappd%2Femscripten-build/lists"}