{"id":15070006,"url":"https://github.com/ollipal/userust","last_synced_at":"2025-04-10T17:10:24.577Z","repository":{"id":65421384,"uuid":"588861923","full_name":"ollipal/useRust","owner":"ollipal","description":"Custom Rust WebAssembly hooks for React and SolidJS projects","archived":false,"fork":false,"pushed_at":"2023-07-29T12:27:37.000Z","size":591,"stargazers_count":8,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-10-20T08:56:21.437Z","etag":null,"topics":["react","rust","solidjs","typrescript","wasm","wasm-bindgen"],"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/ollipal.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":"2023-01-14T09:16:44.000Z","updated_at":"2024-10-15T21:47:40.000Z","dependencies_parsed_at":"2025-02-17T16:46:40.352Z","dependency_job_id":null,"html_url":"https://github.com/ollipal/useRust","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/ollipal%2FuseRust","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ollipal%2FuseRust/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ollipal%2FuseRust/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ollipal%2FuseRust/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ollipal","download_url":"https://codeload.github.com/ollipal/useRust/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248261236,"owners_count":21074218,"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":["react","rust","solidjs","typrescript","wasm","wasm-bindgen"],"created_at":"2024-09-25T01:46:25.633Z","updated_at":"2025-04-10T17:10:24.558Z","avatar_url":"https://github.com/ollipal.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# useRust\n\nAdd custom Rust WebAssembly hooks to React and SolidJS projects\n\n```rust\n// my-rust-code/src/lib.rs\n#[wasm_bindgen]\npub fn add(a: i32, b: i32) -\u003e i32 {\n    a + b\n}\n```\n\n```js\nimport useRust from 'my-rust-code'\n\nconst Calculator = () =\u003e {\n  const { rust, error } = useRust()\n  return \u003cdiv\u003e1+1={rust?.add(1,1)}\u003c/div\u003e\n}\n```\n\n## How it works\n\n1. Have an existing React or SolidJS project\n2. `npx userust init NAME` will compile and install a custom useRust hook to your project\n3. Use it in your project: `import useRust from 'NAME'` \n4. Make changes to `./NAME/src/lib.rs`\n5. `npm run NAME:build` will recompile the useRust hook\n\nAlternatively you can use `npm run NAME:watch` to automatically recompile after changes to Rust code\n\nUses [wasm-bindgen](https://rustwasm.github.io/wasm-bindgen/). See Rust code examples at its [documentation page](https://rustwasm.github.io/wasm-bindgen/).\n\n## Features\n\n- Leverage Rust and Wasm to speed up critical parts of your frontend\n- Fully typed TypeScript interface, works in JavaScript projects as well\n- No limitations for Rust code, provides a minimal, properly configured boilerplate to start with\n- Develop frontend and Rust code from the same monorepo with a few simple commands\n- Tested on Linux, MacOS and Windows\n- npm, pnpm and yarn supported\n- Simple interface inspired by [SWR](https://swr.vercel.app/) library\n\n[Full documentation](DOCUMENTATION.md)\n\n## Licence \n\nThe MIT License.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Follipal%2Fuserust","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Follipal%2Fuserust","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Follipal%2Fuserust/lists"}