{"id":13721365,"url":"https://github.com/wasmerio/c-wasm-simd128-example","last_synced_at":"2025-06-25T14:05:20.005Z","repository":{"id":41508184,"uuid":"199094105","full_name":"wasmerio/c-wasm-simd128-example","owner":"wasmerio","description":"Example C++ repo emitting Wasm SIMD 128 instructions","archived":false,"fork":false,"pushed_at":"2019-10-25T19:55:31.000Z","size":6,"stargazers_count":30,"open_issues_count":2,"forks_count":5,"subscribers_count":15,"default_branch":"master","last_synced_at":"2025-06-22T06:15:23.118Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"C++","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/wasmerio.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}},"created_at":"2019-07-27T00:00:25.000Z","updated_at":"2024-12-04T16:21:48.000Z","dependencies_parsed_at":"2022-07-07T15:19:47.223Z","dependency_job_id":null,"html_url":"https://github.com/wasmerio/c-wasm-simd128-example","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/wasmerio/c-wasm-simd128-example","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wasmerio%2Fc-wasm-simd128-example","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wasmerio%2Fc-wasm-simd128-example/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wasmerio%2Fc-wasm-simd128-example/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wasmerio%2Fc-wasm-simd128-example/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wasmerio","download_url":"https://codeload.github.com/wasmerio/c-wasm-simd128-example/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wasmerio%2Fc-wasm-simd128-example/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261888088,"owners_count":23225138,"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-03T01:01:16.115Z","updated_at":"2025-06-25T14:05:19.944Z","avatar_url":"https://github.com/wasmerio.png","language":"C++","funding_links":[],"categories":["C++"],"sub_categories":[],"readme":"# C++ Wasm SIMD 128 example\n\nThis repo is made to showcase how to emit Wasm SIMD 128 instructions from C++, and use it with [Wasmer](https://github.com/wasmerio/wasmer).\n\n## Build\n\n```bash\n./build.sh\n```\n\nIt will download the [WASI SDK 5](https://github.com/CraneStation/wasi-sdk/releases/tag/wasi-sdk-5) (the macOS or linux version, depending on your system).\n\n## Run it!\n\nYou can run the SIMD version with [Wasmer](https://wasmer.io/):\n\n```bash\nwasmer run --backend=llvm --enable-simd build/particle-repel-simd.wasm\n```\n\nOr run the non-SIMD version\n\n```bash\nwasmer run --backend=llvm build/particle-repel.wasm\n```\n\nOr run the Native SIMD version\n\n```bash\n./build/particle-repel\n```\n\n\nAfter running it, the results should be something like:\n\n```\nBeginning simulation.\n5.44089e-21\n9.19434e-22\n9.98077e-20\n1.01414e-17\n1.89481e-17\n3.61239e-16\n2.24645e-14\n1.24237e-13\n2.39859e-13\n3.13435e-13\n4.13311e-13\n6.31935e-13\n4.59395e-10\n6.40114e-10\n1.15545e-09\n2.24414e-10\n1.03695e-09\n4.06071e-10\n7.64414e-10\n7.57652e-10\n```\n\n## Benchmarks\n\n```\n# Native\ntime ./build/particle-repel # 4.930 total\n\n# Wasmer SIMD\ntime wasmer run --backend=llvm --enable-simd build/particle-repel-simd.wasm # 4.980 total\n\n# Wasmer Non-SIMD\ntime wasmer run --backend=llvm build/particle-repel.wasm # 11.630 total\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwasmerio%2Fc-wasm-simd128-example","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwasmerio%2Fc-wasm-simd128-example","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwasmerio%2Fc-wasm-simd128-example/lists"}