{"id":31829558,"url":"https://github.com/itsdevdom/react-webassembly-experiment","last_synced_at":"2025-10-11T20:28:46.490Z","repository":{"id":66237601,"uuid":"255937893","full_name":"itsdevdom/react-webassembly-experiment","owner":"itsdevdom","description":"[EXPERIMENT] Using WebAssembly in a TypeScript React project, based on create-react-app","archived":false,"fork":false,"pushed_at":"2020-11-10T17:36:50.000Z","size":481,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-07-09T00:51:55.403Z","etag":null,"topics":["create-react-app","react","typescript","wasm","webassembly"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/itsdevdom.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}},"created_at":"2020-04-15T14:13:16.000Z","updated_at":"2021-03-23T15:59:21.000Z","dependencies_parsed_at":"2023-02-20T16:31:20.728Z","dependency_job_id":null,"html_url":"https://github.com/itsdevdom/react-webassembly-experiment","commit_stats":null,"previous_names":["itsdevdom/react-webassembly-experiment"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/itsdevdom/react-webassembly-experiment","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/itsdevdom%2Freact-webassembly-experiment","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/itsdevdom%2Freact-webassembly-experiment/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/itsdevdom%2Freact-webassembly-experiment/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/itsdevdom%2Freact-webassembly-experiment/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/itsdevdom","download_url":"https://codeload.github.com/itsdevdom/react-webassembly-experiment/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/itsdevdom%2Freact-webassembly-experiment/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279008616,"owners_count":26084480,"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-11T02:00:06.511Z","response_time":55,"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":["create-react-app","react","typescript","wasm","webassembly"],"created_at":"2025-10-11T20:28:44.849Z","updated_at":"2025-10-11T20:28:46.484Z","avatar_url":"https://github.com/itsdevdom.png","language":"TypeScript","readme":"\u003cdiv align=\"center\"\u003e\n\n# react-webassembly-experiment\n\nUsing **[WebAssembly](https://developer.mozilla.org/en-US/docs/WebAssembly)** in a\n**[TypeScript](https://github.com/microsoft/TypeScript)** **[React](https://github.com/facebook/react)** app, based on\n**[create-react-app](https://github.com/facebook/create-react-app)**.\n\n\u003c/div\u003e\n\n\u003cbr\u003e\u003cbr\u003e\n\n## How to use WebAssembly modules in a TypeScript React app\n\nThis repository shows the simplest use case, meaning that a compiled `.wasm` file already exists.\n\n\u003e Testing is out of scope, mocking might be required.\n\n\u003cbr\u003e\n\n### Provide the WebAssembly module\n\nDepending on your use case, various ways exist to provide your WebAssembly module to the application:\n\n- IF you only use the WebAssembly module in your application, place the `.wasm` file somewhere into your `public` folder, e.g. `public/wasm`\n- IF you intend to use the same WebAssembly module across multiple different applications, or want to decouple it from any specific\n  applications, you can also serve your `.wasm` file from any URL\n\n\u003cbr\u003e\n\n### Use the WebAssembly module\n\nFetch and instantiate the module:\n\n```ts\n// Load module\n// Note: You might lazy-load and instantiate the module only once actually needed (#perfmatters)\nconst MyWasmModule = await WebAssembly.instantiateStreaming(fetch('./wasm/my-module.wasm'));\nconst MyWasmModuleInstance = AddModule.instance.exports as any;\n\n// Use the module\nconst result = MyWasmModuleInstance.doSomething(inputA, inputB);\n```\n\n\u003e This project contains an example WASM module that adds two numbers together (see `./public/wasm/add.wasm`).\n\n\u003cbr\u003e\u003cbr\u003e\n\n## Commands\n\nThe following commands are available:\n\n| Command               | Description                                        | CI                 |\n| --------------------- | -------------------------------------------------- | ------------------ |\n| `npm start`           | Creates a development build, running in watch mode |                    |\n| `npm run start:build` | Serves the production build                        |                    |\n| `npm run build`       | Creates a production build                         | :heavy_check_mark: |\n| `npm run test`        | Executes all unit tests                            | :heavy_check_mark: |\n| `npm run test:watch`  | Executes all unit tests, running in watch mode     |                    |\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fitsdevdom%2Freact-webassembly-experiment","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fitsdevdom%2Freact-webassembly-experiment","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fitsdevdom%2Freact-webassembly-experiment/lists"}