{"id":17537727,"url":"https://github.com/bates64/minimal-cmake-cheerp","last_synced_at":"2026-04-14T06:32:49.945Z","repository":{"id":190166961,"uuid":"682075849","full_name":"bates64/minimal-cmake-cheerp","owner":"bates64","description":"Example of a CMake project that uses Cheerp to compile C++ to WebAssembly","archived":false,"fork":false,"pushed_at":"2023-08-23T11:54:29.000Z","size":3,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-30T02:59:10.156Z","etag":null,"topics":["cheerp","cmake","cmake-examples","cpp","javascript","js","wasm","webassembly"],"latest_commit_sha":null,"homepage":"","language":"Makefile","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/bates64.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}},"created_at":"2023-08-23T11:40:16.000Z","updated_at":"2023-08-23T11:41:56.000Z","dependencies_parsed_at":null,"dependency_job_id":"34e61ebd-2c86-4bfd-bcd6-042c15054553","html_url":"https://github.com/bates64/minimal-cmake-cheerp","commit_stats":null,"previous_names":["nanaian/minimal-cmake-cheerp","bates64/minimal-cmake-cheerp"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/bates64/minimal-cmake-cheerp","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bates64%2Fminimal-cmake-cheerp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bates64%2Fminimal-cmake-cheerp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bates64%2Fminimal-cmake-cheerp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bates64%2Fminimal-cmake-cheerp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bates64","download_url":"https://codeload.github.com/bates64/minimal-cmake-cheerp/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bates64%2Fminimal-cmake-cheerp/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31785622,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-14T02:24:21.117Z","status":"ssl_error","status_checked_at":"2026-04-14T02:24:20.627Z","response_time":153,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["cheerp","cmake","cmake-examples","cpp","javascript","js","wasm","webassembly"],"created_at":"2024-10-20T20:42:35.886Z","updated_at":"2026-04-14T06:32:49.932Z","avatar_url":"https://github.com/bates64.png","language":"Makefile","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Minimal Cheerp CMake example\n\n[![Discord server](https://img.shields.io/discord/988743885121548329?color=%237289DA\u0026logo=discord\u0026logoColor=ffffff)](https://discord.gg/3UfTSbWdYy)\n\nThis is a minimal example of a CMake project that uses [Cheerp](https://labs.leaningtech.com/cheerp) to compile [main.cpp](/main.cpp) to WebAssembly and JavaScript.\n\n## Building\n\nSet the `CHEERP` environment variable to the path of your Cheerp installation. For example:\n- On Linux: `export CHEERP=/opt/cheerp`\n- On macOS: `export CHEERP=/Applications/cheerp`\n- On Windows: `set CHEERP=C:\\cheerp`\n\nThen run the following commands to configure and build the project:\n\n```bash\nmkdir build\ncd build\ncmake -DCMAKE_TOOLCHAIN_FILE=$CHEERP/share/cmake/Modules/CheerpWasmToolchain.cmake ..\nmake\n```\n\nThis will build `app.js` and `app.wasm` in the `build` directory.\n\n## Running\n\n### In the browser\n\nCopy [index.html](/index.html) into the `build` directory, and serve it with your favourite web server.\n\nFor example:\n\n```bash\ncd build\ncp ../index.html .\nnpx vite\n```\n\n### With Node.js\n\nBecause we only use the `console.log` function, we can run the WebAssembly module with Node.js.\n\n```bash\ncd build\nnode app.wasm\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbates64%2Fminimal-cmake-cheerp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbates64%2Fminimal-cmake-cheerp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbates64%2Fminimal-cmake-cheerp/lists"}