{"id":22736100,"url":"https://github.com/0xfourzerofour/wgpu-svelte","last_synced_at":"2025-04-14T03:21:32.464Z","repository":{"id":51361081,"uuid":"520385464","full_name":"0xfourzerofour/wgpu-svelte","owner":"0xfourzerofour","description":"An example of how to import a WGPU canvas to the svelte framework","archived":false,"fork":false,"pushed_at":"2022-08-02T08:09:37.000Z","size":39,"stargazers_count":8,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-27T17:21:20.935Z","etag":null,"topics":["svelte","webgl2","wgpu","wgpu-rs"],"latest_commit_sha":null,"homepage":"","language":"Rust","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/0xfourzerofour.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-08-02T06:52:20.000Z","updated_at":"2024-12-30T00:21:50.000Z","dependencies_parsed_at":"2022-09-14T01:33:42.027Z","dependency_job_id":null,"html_url":"https://github.com/0xfourzerofour/wgpu-svelte","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/0xfourzerofour%2Fwgpu-svelte","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0xfourzerofour%2Fwgpu-svelte/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0xfourzerofour%2Fwgpu-svelte/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0xfourzerofour%2Fwgpu-svelte/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/0xfourzerofour","download_url":"https://codeload.github.com/0xfourzerofour/wgpu-svelte/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248814048,"owners_count":21165671,"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":["svelte","webgl2","wgpu","wgpu-rs"],"created_at":"2024-12-10T21:17:30.780Z","updated_at":"2025-04-14T03:21:32.439Z","avatar_url":"https://github.com/0xfourzerofour.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# WGPU + Vite + Svelte\n## Quick Start\n### Unix\n\nAssuming a fresh install (no node, no rust)\n\n1. Clone the repo.\n2. `cd` into repo\n3. Install [nvm](https://github.com/nvm-sh/nvm#installing-and-updating), close and reopen terminal after install.\n4. Run\n```bash\nnvm install --lts\n```\n5. To verify install run\n```bash\nnode -v\n// should output something similar to\nv16.13.0\n```\n6. This monorepo uses [yarn workspaces](https://yarnpkg.com/features/workspaces) under the hood. Install `yarn` by running\n```bash\nnpm i -g yarn\n```\n7. Install [rustup + rust](https://www.rust-lang.org/tools/install)\n```bash\ncurl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh\n// follow installation prompts, close and reopen terminal after install.\n```\n8. Install [wasm-pack](https://rustwasm.github.io/wasm-pack/installer/)\n```bash\ncurl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh\n```\n9. If in Ubuntu or similar, you need to install a CC linker (you might already have it if you've run sudo apt-get update before), run\n```bash\nsudo apt-get update\nsudo apt install build-essential\n\n```\n10. Yarn needs rust to be built at least once so it can cross reference dependencies in the monorepo. Run in the `packages/rust` directory\n```bash\ncd packages/rust\n# build WebAssembly and Javascript wrappers using wasm-pack\n# don't panic, this might take a few seconds\nwasm-pack build --target web\n# Then initialize yarn in the rust directory\nyarn\n# go back to the monorepo root directory\ncd ../..\n```\n11. Install node dependencies, run\n```bash\nyarn\n```\n12. Install [cargo watch](https://crates.io/crates/cargo-watch)\n```bash\ncargo install cargo-watch\n```\n13. To start the development server, run\n```\nyarn dev\n```\n14. Enjoy! Got some feedback? Open an issue, or better yet, a PR. If you like this template, please star this repo.\n\n## What's next\nThis needs to work with a regular CI (ie: vercel/netlify/github pages). Will create a guide for this if there is enough demand for it.\n\nIf this gets enough attention, and there demand for it, I will create a template for sveltekit, and potentially for vue and react.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F0xfourzerofour%2Fwgpu-svelte","html_url":"https://awesome.ecosyste.ms/projects/github.com%2F0xfourzerofour%2Fwgpu-svelte","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F0xfourzerofour%2Fwgpu-svelte/lists"}