{"id":21591055,"url":"https://github.com/tuananh/emsdk-docker","last_synced_at":"2025-03-18T10:15:38.928Z","repository":{"id":142279179,"uuid":"116243323","full_name":"tuananh/emsdk-docker","owner":"tuananh","description":"Docker image for emsdk","archived":false,"fork":false,"pushed_at":"2018-01-04T14:28:29.000Z","size":2,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"develop","last_synced_at":"2025-01-24T16:29:04.907Z","etag":null,"topics":["docker","emsdk"],"latest_commit_sha":null,"homepage":null,"language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tuananh.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-01-04T09:51:37.000Z","updated_at":"2020-07-27T10:33:43.000Z","dependencies_parsed_at":null,"dependency_job_id":"b3537169-1320-4b49-92e5-0952bc096bcf","html_url":"https://github.com/tuananh/emsdk-docker","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tuananh%2Femsdk-docker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tuananh%2Femsdk-docker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tuananh%2Femsdk-docker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tuananh%2Femsdk-docker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tuananh","download_url":"https://codeload.github.com/tuananh/emsdk-docker/tar.gz/refs/heads/develop","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244198406,"owners_count":20414443,"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":["docker","emsdk"],"created_at":"2024-11-24T16:22:24.912Z","updated_at":"2025-03-18T10:15:38.907Z","avatar_url":"https://github.com/tuananh.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"emsdk-docker\n------------\n\n\u003e Docker container with emsdk installed.\n\n## Example usage\n\nWe can use this Docker image to build C/C++ files without the need to setup\nEmscripten on the host machine.\n\nPut the below script in your `package.json` scripts\n\n```sh\ndocker run -it --rm -u $(id -u):$(id -g) -v $PWD:/src -w /src tuananh/emsdk emcc -O3 src/xxhash.c -s WASM=1 -s SIDE_MODULE=1 -o src/xxhash.wasm\n```\n\nIn this example, suppose our project has a `src` folder with a C file `xxhash.c` in it.\nWhat we do here is that we will mount the `src` folder into the container's `/src` folder, compile\nit the `.wasm` there in the container and output it back to the host's `src` folder.\n\n```json\n\"scripts\": {\n    \"build\": \"docker run -it --rm -u $(id -u):$(id -g) -v $PWD:/src -w /src tuananh/emsdk emcc -O3 src/xxhash.c -s WASM=1 -s SIDE_MODULE=1 -o src/xxhash.wasm\",\n    \"test\": \"echo \\\"Error: no test specified\\\" \u0026\u0026 exit 1\"\n},\n```\n\nand `yarn build`. BAM!! your `.wasm` file is there in the `src` folder.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftuananh%2Femsdk-docker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftuananh%2Femsdk-docker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftuananh%2Femsdk-docker/lists"}