{"id":19910980,"url":"https://github.com/leaningtech/cheerp-utils","last_synced_at":"2026-03-05T09:03:01.272Z","repository":{"id":11490584,"uuid":"13964283","full_name":"leaningtech/cheerp-utils","owner":"leaningtech","description":"Cheerp headers and utils","archived":false,"fork":false,"pushed_at":"2026-02-25T14:47:35.000Z","size":2238,"stargazers_count":35,"open_issues_count":1,"forks_count":15,"subscribers_count":11,"default_branch":"master","last_synced_at":"2026-02-25T18:20:59.104Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/leaningtech.png","metadata":{"files":{"readme":"README","changelog":"ChangeLog","contributing":null,"funding":null,"license":"LICENSE.TXT","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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2013-10-29T18:11:06.000Z","updated_at":"2026-02-25T14:48:18.000Z","dependencies_parsed_at":"2023-02-13T23:30:55.388Z","dependency_job_id":"7c8fb361-76f1-4fad-8e7c-30e819191f3f","html_url":"https://github.com/leaningtech/cheerp-utils","commit_stats":null,"previous_names":[],"tags_count":21,"template":false,"template_full_name":null,"purl":"pkg:github/leaningtech/cheerp-utils","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leaningtech%2Fcheerp-utils","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leaningtech%2Fcheerp-utils/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leaningtech%2Fcheerp-utils/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leaningtech%2Fcheerp-utils/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/leaningtech","download_url":"https://codeload.github.com/leaningtech/cheerp-utils/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leaningtech%2Fcheerp-utils/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30117482,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-05T08:19:04.902Z","status":"ssl_error","status_checked_at":"2026-03-05T08:17:37.148Z","response_time":93,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: 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":[],"created_at":"2024-11-12T21:22:45.632Z","updated_at":"2026-03-05T09:03:01.213Z","avatar_url":"https://github.com/leaningtech.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"Cheerp: A C++ compiler for the Web\n------------------------------------------\n\nCheerp is a tool to bring C++ programming to the Web. It can generate a seamless\ncombination of JavaScript, WebAssembly and Asm.js from a single C++ codebase.\n\nInstallation\n------------------------------------------\n\nDepending on your platform, cheerp needs to be unpacked in a different path:\n\nWindows\n\n\tc:\\cheerp\\\n\nMac OS\n\n\t/Applications/cheerp\n\nLinux\n\n\t/opt/cheerp\n\nIn the following instructions  /opt/cheerp/ is assumed.\n\nUsage\n------------------------------------------\n\nCheerp is integrated in the LLVM/clang infrastructure.\nTo build client side JavaScript code from C++ source files\n\n\t/opt/cheerp/bin/clang -O3 -target cheerp \u003cfile1.cpp\u003e \u003cfile2.cpp\u003e -o \u003cfile.js\u003e\n\nBuilding objects file separately and linking only at the end is also possible.\n\n\t/opt/cheerp/bin/clang++ -O3 -c -target cheerp \u003cfile1.cpp\u003e -o \u003cfile1.bc\u003e\n\t/opt/cheerp/bin/clang++ -O3 -c -target cheerp \u003cfile2.cpp\u003e -o \u003cfile2.bc\u003e\n\t/opt/cheerp/bin/clang++ -target cheerp \u003cfile1.bc\u003e \u003cfile2.bc\u003e -o \u003clinkedfile.js\u003e\n\nLibraries can be built as well, they are stored using LLVM binary representation\n\n\t/opt/cheerp/bin/clang++ -O3 -c -target cheerp \u003cfile1.cpp\u003e -o \u003cfile1.bc\u003e\n\t/opt/cheerp/bin/clang++ -O3 -c -target cheerp \u003cfile2.cpp\u003e -o \u003cfile2.bc\u003e\n\t/opt/cheerp/bin/llvm-link \u003cfile1.bc\u003e \u003cfile2.bc\u003e ... -o \u003clibrary.bc\u003e\n\nA cmake toolchain file is provided in /opt/cheerp/share/cmake/Modules/CheerpToolchain.cmake\nit's possible to cross-compile cmake projects for the Cheerp platform using the syntax\n\n\tcmake -DCMAKE_TOOLCHAIN_FILE=/opt/cheerp/share/cmake/Modules/CheerpToolchain.cmake \u003cregular arguments\u003e\n\nPlease note that, currently, only building static libraries is supported.\n\nCode conventions\n------------------------------------------\n\nGlobal variables and types that are provided by the browser\nenvironment are accessible through the 'client' namespace\n\n\tclient::document.addEventListener(...)\n\nOf course, being a regular C++ namespace you can reduce\ncode verbosity by\n\n\tusing namespace client;\n\nThe relevant headers that defines client interfaces are\n\n\t#include \u003ccheerp/client.h\u003e //Misc client side stuff\n\t#include \u003ccheerp/clientlib.h\u003e //Complete DOM/HTML5 interface\n\t#include \u003ccheerp/webgl.h\u003e //WebGL interface\n\nBy convention the method that will be called first on the\nclient side should have the following signature\n\n\tvoid webMain()\n\nNOTE: As usual in JavaScript programming the script will be\nloaded before the DOM is completely loaded, and so webMain will\nbe called on an incomplete document, to execute a callback after\nloading is complete you can do this\n\n\tvoid loadCallback()\n\t{\n\t\t...\n\t}\n\n\tvoid webMain()\n\t{\n\t\tdocument.addEventListener(\"DOMContentLoaded\",Callback(loadCallback));\n\t}\n\nIn a similar way you can bind to any other DOM event\n\nProperties of DOM objects are always accessed through setters/getters\n\n\t{\n\t\tauto body = document.get_body();\n\t}\n\nSmall examples are included in /opt/cheerp/share/cheerp/examples/\n\nLimitations as of this version\n------------------------------------------\n\nNone known\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fleaningtech%2Fcheerp-utils","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fleaningtech%2Fcheerp-utils","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fleaningtech%2Fcheerp-utils/lists"}