{"id":13806993,"url":"https://github.com/yewstack/yew-wasm-pack-minimal","last_synced_at":"2025-07-19T19:38:42.653Z","repository":{"id":54611013,"uuid":"201705031","full_name":"yewstack/yew-wasm-pack-minimal","owner":"yewstack","description":"A minimal template for starting a Yew project using wasm-bindgen and wasm-pack","archived":false,"fork":false,"pushed_at":"2023-10-19T08:17:39.000Z","size":31,"stargazers_count":113,"open_issues_count":4,"forks_count":23,"subscribers_count":12,"default_branch":"master","last_synced_at":"2024-11-18T23:51:17.857Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/yewstack.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE-APACHE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2019-08-11T02:05:00.000Z","updated_at":"2024-10-20T15:33:51.000Z","dependencies_parsed_at":"2024-01-23T17:32:52.729Z","dependency_job_id":"a254fbc8-349e-47f3-8b87-d81a9303f635","html_url":"https://github.com/yewstack/yew-wasm-pack-minimal","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/yewstack%2Fyew-wasm-pack-minimal","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yewstack%2Fyew-wasm-pack-minimal/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yewstack%2Fyew-wasm-pack-minimal/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yewstack%2Fyew-wasm-pack-minimal/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/yewstack","download_url":"https://codeload.github.com/yewstack/yew-wasm-pack-minimal/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":231872385,"owners_count":18438970,"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-04T01:01:19.127Z","updated_at":"2024-12-30T14:35:25.465Z","avatar_url":"https://github.com/yewstack.png","language":"Rust","funding_links":[],"categories":["Templates"],"sub_categories":[],"readme":"## About\n\nThis template demonstrates the minimum code and tooling necessary for a frontend web app with simple deployable artifacts consisting of one HTML file, one JavaScript file, and one WebAssembly file, using [`Yew`](https://github.com/yewstack/yew), [`wasm-bindgen`](https://github.com/rustwasm/wasm-bindgen), and [`wasm-pack`](https://github.com/rustwasm/wasm-pack).\n\nNote: [`yew-wasm-pack-template`](https://github.com/yewstack/yew-wasm-pack-template) is the full-featured counterpart to this template, integrating many common web technologies.\n\n## Usage\n\n### 1) Install `Rust` and `wasm-pack`\n\nFollow the instructions at https://www.rust-lang.org/tools/install and follow the `installation` link at [`wasm-pack`](https://github.com/rustwasm/wasm-pack).\n\n### 2) Build\n\nEnter `wasm-pack build --target web` from your project's root directory.\n\n### 3) [temporary] Bundle\n\nEnter `rollup ./main.js --format iife --file ./pkg/bundle.js` from your project's root directory.\n\nNote: Until `wasm-pack` [RFC #6](https://github.com/rustwasm/rfcs/blob/master/text/006-local-js-dependencies.md) is implemented there is no available option to [generate a single amalgamated JavaScript file](https://github.com/rustwasm/wasm-pack/issues/699).  In the interim a bundler, such as [`Rollup`](https://rollupjs.org/guide/en/#quick-start), must be used.\n\n### 4) [optional] Test Run\n\nRun a webserver from your project's root directory, such as with the Python 3 command: `python -m http.server 8080`, and load http://localhost:8080/ in a browser to run the app.\n\nNote: It's expected behavior for the browser console to display an error similar to \"WebAssembly.instantiateStreaming failed. Assuming this is because your server does not serve wasm with application/wasm MIME type.\"  Your production webserver should be configured to associate WebAssembly files with the `application/wasm` MIME type.\n\nIf you have become an orthodox Rust person than you can use `see` or `miniserve` servers to share assets:\n\n```\ncargo install see\nsee start -b 8080\n```\n\n### 5) Deploy\n\nAccess your generated build artifacts, `bundle.js` and `yew_wasm_pack_minimal_bg.wasm`, in ./pkg from your project's root directory.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyewstack%2Fyew-wasm-pack-minimal","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyewstack%2Fyew-wasm-pack-minimal","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyewstack%2Fyew-wasm-pack-minimal/lists"}