{"id":13520738,"url":"https://github.com/binji/wasm-clang","last_synced_at":"2025-04-09T07:07:27.534Z","repository":{"id":44609688,"uuid":"203206957","full_name":"binji/wasm-clang","owner":"binji","description":"Running Clang/LLD in WebAssembly Demo","archived":false,"fork":false,"pushed_at":"2023-12-07T18:35:20.000Z","size":50683,"stargazers_count":294,"open_issues_count":9,"forks_count":29,"subscribers_count":15,"default_branch":"master","last_synced_at":"2025-04-02T06:07:57.311Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://binji.github.io/wasm-clang","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/binji.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}},"created_at":"2019-08-19T16:11:00.000Z","updated_at":"2025-03-23T15:20:08.000Z","dependencies_parsed_at":"2024-01-16T14:14:30.340Z","dependency_job_id":null,"html_url":"https://github.com/binji/wasm-clang","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/binji%2Fwasm-clang","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/binji%2Fwasm-clang/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/binji%2Fwasm-clang/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/binji%2Fwasm-clang/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/binji","download_url":"https://codeload.github.com/binji/wasm-clang/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247994121,"owners_count":21030050,"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-08-01T06:00:20.834Z","updated_at":"2025-04-09T07:07:27.501Z","avatar_url":"https://github.com/binji.png","language":"JavaScript","funding_links":[],"categories":["WASI Programs"],"sub_categories":["C"],"readme":"# Clang/LLD in WebAssembly\n\nThis is the demo for my CppCon 2019 talk! You can view the talk on [youtube](https://www.youtube.com/watch?v=5N4b-rU-OAA)\n\nThing should work, but it's still very much alpha demoware. Go to https://binji.github.io/wasm-clang to see it in action.\n\nMost of the JavaScript code can be found here. If you're interested in the implementation of the in-memory filesystem, take a look at https://github.com/binji/llvm-project/tree/master/binji.\n\nSome notes on how I built this, sorry that they are relatively sparse: https://gist.github.com/binji/b7541f9740c21d7c6dac95cbc9ea6fca\n\n# Directory structure\n\n## Shared utilities\n\n- `clang`: clang compiler, compiled to wasm w/ WASI\n- `lld`: lld linker, compiled to wasm w/ WASI\n- `main`.css\n- `memfs`: WASI implementation of in-memory filesystem,\n- `shared.js`: shared utilities for all tools (web and d8)\n- `shared_web.js`: shared utilities for all web tools (asm.html, index.html, etc.)\n- `sysroot.tar`: C++ standard headers and libraries\n- `service_worker.js`: Service worker used by all web pages\n- `worker.js`: Dedicated work used to compile/run\n\n## Assemble 6502 code\n\n- `6502.html`\n- `6502.js`\n- `vasm6502_oldstyle`: [vasm assembler](http://sun.hasenbraten.de/vasm/) compiled to wasm w/ WASI\n\n## Compile C++ code to x86/wasm assembly\n\n- `asm.html`\n- `asm.js`\n\n## Compile C++ code in d8 (v8's console shell)\n\n- `d8.js`\n\n## Compile and run C++ code\n\n- `index.html`\n- `web.js`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbinji%2Fwasm-clang","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbinji%2Fwasm-clang","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbinji%2Fwasm-clang/lists"}