{"id":22354020,"url":"https://github.com/movableink/ember-cli-emscripten","last_synced_at":"2025-07-09T07:05:33.270Z","repository":{"id":28123536,"uuid":"31622580","full_name":"movableink/ember-cli-emscripten","owner":"movableink","description":"Compile c/c++ inside ember projects using emscripten","archived":false,"fork":false,"pushed_at":"2015-03-04T00:24:46.000Z","size":103,"stargazers_count":30,"open_issues_count":0,"forks_count":2,"subscribers_count":8,"default_branch":"master","last_synced_at":"2025-07-09T07:03:09.837Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/movableink.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-03-03T21:34:25.000Z","updated_at":"2023-07-25T13:55:10.000Z","dependencies_parsed_at":"2022-08-01T13:27:21.252Z","dependency_job_id":null,"html_url":"https://github.com/movableink/ember-cli-emscripten","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/movableink/ember-cli-emscripten","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/movableink%2Fember-cli-emscripten","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/movableink%2Fember-cli-emscripten/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/movableink%2Fember-cli-emscripten/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/movableink%2Fember-cli-emscripten/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/movableink","download_url":"https://codeload.github.com/movableink/ember-cli-emscripten/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/movableink%2Fember-cli-emscripten/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264411128,"owners_count":23603800,"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":[],"created_at":"2024-12-04T13:10:52.773Z","updated_at":"2025-07-09T07:05:33.253Z","avatar_url":"https://github.com/movableink.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Ember-CLI Emscripten\n\nember-cli-emscripten allows you to add emscripten-flavored c or c++ code to your ember app, then require the exposed functions and classes.\n\n## Installation\n\n`ember install:addon ember-cli-emscripten`\n\n## Usage\n\nThis addon uses emscripten's [embind](http://kripken.github.io/emscripten-site/docs/porting/connecting_cpp_and_javascript/embind.html) to expose c/c++ functions to javascript.  From the emscripten example, saved as `app/compiled/math.cpp` in your ember-cli app:\n\n```\n#include \u003cemscripten/bind.h\u003e\n\nusing namespace emscripten;\n\nfloat lerp(float a, float b, float t) {\n    return (1 - t) * a + t * b;\n}\n\nEMSCRIPTEN_BINDINGS(my_module) {\n    function(\"lerp\", \u0026lerp);\n}\n```\n\nember-cli-emscripten then exports `lerp` via ES6, so you could use it like so:\n\n```\nimport math from 'ember-app/compiled/math';\n\nmath.lerp(1, 2.5, 5)\n```\n\n## TODO\n\n* Right now every cpp file that gets compiled to js includes the emscripten runtime. Ideally this should only be included once per project.\n* Expose emscripten emcc optimization options.\n\n## License\n\nSee LICENSE.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmovableink%2Fember-cli-emscripten","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmovableink%2Fember-cli-emscripten","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmovableink%2Fember-cli-emscripten/lists"}