{"id":24994009,"url":"https://github.com/deshrike/c-wasm","last_synced_at":"2026-04-05T21:01:47.380Z","repository":{"id":184713280,"uuid":"672352014","full_name":"DeShrike/c-wasm","owner":"DeShrike","description":"Compile C to WebAssembly Experiment","archived":false,"fork":false,"pushed_at":"2023-07-30T20:17:33.000Z","size":489,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-29T13:51:50.059Z","etag":null,"topics":["c","linux","llvm","mandelbrot","wabt","wasm","webassembly"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/DeShrike.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":"2023-07-29T19:25:33.000Z","updated_at":"2023-07-30T20:22:12.000Z","dependencies_parsed_at":"2025-02-04T14:39:19.547Z","dependency_job_id":"b0edc9f1-3c2c-4b37-8875-1854e5f5d051","html_url":"https://github.com/DeShrike/c-wasm","commit_stats":null,"previous_names":["deshrike/c-wasm"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/DeShrike/c-wasm","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DeShrike%2Fc-wasm","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DeShrike%2Fc-wasm/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DeShrike%2Fc-wasm/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DeShrike%2Fc-wasm/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/DeShrike","download_url":"https://codeload.github.com/DeShrike/c-wasm/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DeShrike%2Fc-wasm/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278289499,"owners_count":25962356,"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","status":"online","status_checked_at":"2025-10-04T02:00:05.491Z","response_time":63,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["c","linux","llvm","mandelbrot","wabt","wasm","webassembly"],"created_at":"2025-02-04T14:38:08.538Z","updated_at":"2025-10-04T08:58:37.547Z","avatar_url":"https://github.com/DeShrike.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Compile C to WebAssembly Experiment\r\n\r\n## Dependencies\r\n\r\n- LLVM - at least version 8\r\n- WABT\r\n- cmake - to build WABT, at least version 3.16\r\n\r\n## Getting started\r\n\r\nTested on _Ubuntu 18.04.1 LTS_\r\n\r\nInstall dependencies, see below.\r\n\r\nClone this repo and build:\r\n\r\n```console\r\n$ git clone https://github.com/DeShrike/c-wasm.git\r\n$ cd c-wasm\r\n$ ./build.sh\r\n```\r\n\r\n### Browser\r\n\r\nStart a local webserver:\r\n\r\n```console\r\n$ python3 -m http.server 8000\r\n```\r\n\r\nPoint your browser to http://localhost:8000/index.html\r\n\r\n![Screenshot](c_wasm_screenshot.png)\r\n\r\n### NodeJS\r\n\r\nTested with _v16.20.1_\r\n\r\n```console\r\n$ node node-app.js\r\n```\r\n\r\n## Install LLVM\r\n\r\n```console\r\n$ sudo apt-get install llvm-8 clang-8 lld-8\r\n```\r\n\r\n## Build cmake\r\n\r\n```console\r\n$ mkdir ~/temp\r\n$ cd ~/temp\r\n$ wget https://cmake.org/files/v3.16/cmake-3.16.0.tar.gz\r\n$ tar -xzvf cmake-3.16.0.tar.gz\r\n$ cd cmake-3.16.0/\r\n$ ./bootstrap\r\n$ make -j$(nproc)\r\n$ sudo make install\r\n$ cmake --version\r\n```\r\n\r\n## Clone and build WABT\r\n\r\n```console\r\n$ git clone --recursive https://github.com/WebAssembly/wabt\r\n$ cd wabt\r\n$ git submodule update --init\r\n$ mkdir build\r\n$ cd build\r\n$ cmake ..\r\n$ cmake --build\r\n$ sudo make install\r\n```\r\n\r\n## Usefull commands\r\n\r\n```console\r\n$ wasm-objdump -x main.o\r\n```\r\n\r\n```console\r\n$ wasm2wat main.wasm\r\n```\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdeshrike%2Fc-wasm","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdeshrike%2Fc-wasm","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdeshrike%2Fc-wasm/lists"}