{"id":18427252,"url":"https://github.com/fjebaker/cppfront-to-wasm","last_synced_at":"2026-05-03T18:33:08.467Z","repository":{"id":124945093,"uuid":"593731852","full_name":"fjebaker/cppfront-to-wasm","owner":"fjebaker","description":"Hello World example for compiling cppfront to WASM using either clang or zig.","archived":false,"fork":false,"pushed_at":"2023-01-26T18:04:35.000Z","size":2,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-12-04T22:43:49.665Z","etag":null,"topics":["clang","cpp","cppfront","llvm","wasm","zig","zig-wasm"],"latest_commit_sha":null,"homepage":"","language":"Makefile","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/fjebaker.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2023-01-26T18:03:42.000Z","updated_at":"2023-01-26T18:05:10.000Z","dependencies_parsed_at":null,"dependency_job_id":"e7a3e85c-ab43-4c89-ae76-064fec74f8d1","html_url":"https://github.com/fjebaker/cppfront-to-wasm","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/fjebaker/cppfront-to-wasm","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fjebaker%2Fcppfront-to-wasm","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fjebaker%2Fcppfront-to-wasm/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fjebaker%2Fcppfront-to-wasm/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fjebaker%2Fcppfront-to-wasm/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fjebaker","download_url":"https://codeload.github.com/fjebaker/cppfront-to-wasm/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fjebaker%2Fcppfront-to-wasm/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32579784,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-03T06:36:36.687Z","status":"ssl_error","status_checked_at":"2026-05-03T06:36:09.306Z","response_time":103,"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":["clang","cpp","cppfront","llvm","wasm","zig","zig-wasm"],"created_at":"2024-11-06T05:10:03.286Z","updated_at":"2026-05-03T18:33:08.448Z","avatar_url":"https://github.com/fjebaker.png","language":"Makefile","funding_links":[],"categories":[],"sub_categories":[],"readme":"# cppfront to WASM\n\nThis repository contains a tiny hello world example for compiling [cppfront](https://github.com/hsutter/cppfront) (aka C++ Syntax 2) to WASM, using clang or optionally [zig](https://ziglang.org/).\n\nRequires that [cppfront](https://github.com/hsutter/cppfront) is in the path. The Makefile also needs to be modified at the top to point the include directory for cppfront to the right place.\n\n## Setup (no zig)\n\nInstall LLVM via Homebrew and link\n```bash\nbrew install llvm \\\n    \u0026\u0026 echo 'export PATH=\"$(brew --prefix)/opt/llvm/bin:$PATH\"' \u003e\u003e ~/.zshrc \\\n    \u0026\u0026 source ~/.zshrc\n```\n\nDownload releases from [WebAssembly/wasi-sdk](https://github.com/WebAssembly/wasi-sdk/releases): \n```bash\nwget \"https://github.com/WebAssembly/wasi-sdk/releases/download/wasi-sdk-19/wasi-sysroot-19.0.tar.gz\" \\\n    \u0026\u0026 wget \"https://github.com/WebAssembly/wasi-sdk/releases/download/wasi-sdk-19/libclang_rt.builtins-wasm32-wasi-19.0.tar.gz\" \\\n    \u0026\u0026 tar xf wasi-sysroot-19.0.tar.gz \\\n    \u0026\u0026 tar xf libclang_rt.builtins-wasm32-wasi-19.0.tar.gz\n```\n\nMove the `lib/wasi` directory extracted to clang lib (note: versions may differ):\n\n```bash\nmv lib/wasi $(brew --prefix)/Cellar/llvm/15.0.7_1/lib/clang/15.0.7/lib/ \\\n    \u0026\u0026 rm -d lib\n```\n\nThen\n```bash\nmake\n```\n\nRun it with [bytecodealliance/wasmtime](https://github.com/bytecodealliance/wasmtime):\n\n```bash\nwasmtime cart.wasm\n# Hello world from cppfront!\n```\n\n## Cool and nice and fast with zig\n\nUse Zig target (none of the above required, only needs zig in `PATH`):\n\n```bash\nmake zig\n```\n\n## Recommended tools\n- [WebAssembly/wabt](https://github.com/WebAssembly/wabt)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffjebaker%2Fcppfront-to-wasm","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffjebaker%2Fcppfront-to-wasm","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffjebaker%2Fcppfront-to-wasm/lists"}