{"id":13478656,"url":"https://github.com/jetli/rust-yew-realworld-example-app","last_synced_at":"2025-05-16T15:07:01.220Z","repository":{"id":38272617,"uuid":"219413766","full_name":"jetli/rust-yew-realworld-example-app","owner":"jetli","description":"Exemplary real world app built with Rust + Yew + WebAssembly, by Function Components + Hooks, also supports desktop by Tauri.","archived":false,"fork":false,"pushed_at":"2024-05-01T01:13:39.000Z","size":17742,"stargazers_count":879,"open_issues_count":7,"forks_count":109,"subscribers_count":17,"default_branch":"master","last_synced_at":"2025-04-12T11:58:07.884Z","etag":null,"topics":["desktop","hooks","react","realworld","rust","tauri","wasm","web","webassembly","yew"],"latest_commit_sha":null,"homepage":"https://jetli.github.io/rust-yew-realworld-example-app/","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/jetli.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","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":"2019-11-04T03:57:57.000Z","updated_at":"2025-04-10T20:59:01.000Z","dependencies_parsed_at":"2023-02-03T03:15:32.919Z","dependency_job_id":"23348ac6-ebc1-4792-bf78-44525bee1390","html_url":"https://github.com/jetli/rust-yew-realworld-example-app","commit_stats":null,"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jetli%2Frust-yew-realworld-example-app","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jetli%2Frust-yew-realworld-example-app/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jetli%2Frust-yew-realworld-example-app/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jetli%2Frust-yew-realworld-example-app/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jetli","download_url":"https://codeload.github.com/jetli/rust-yew-realworld-example-app/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254553959,"owners_count":22090417,"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":["desktop","hooks","react","realworld","rust","tauri","wasm","web","webassembly","yew"],"created_at":"2024-07-31T16:01:59.978Z","updated_at":"2025-05-16T15:07:01.176Z","avatar_url":"https://github.com/jetli.png","language":"Rust","funding_links":[],"categories":["Rust","Projects"],"sub_categories":[],"readme":"# ![RealWorld Example App](logo.png)\n\n[![Continuous Integration](https://github.com/jetli/rust-yew-realworld-example-app/workflows/build/badge.svg)](https://github.com/jetli/rust-yew-realworld-example-app/actions)\n[![RealWorld Frontend](https://img.shields.io/badge/realworld-frontend-%23783578.svg)](http://realworld.io)\n\n\u003e [Rust] + [Yew] + [WebAssembly] codebase containing real world examples (CRUD, auth, advanced patterns, etc) that adheres to the [RealWorld] spec and API.\n\n## [Demo]\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;[RealWorld]\n\nThis codebase was created to demonstrate a fully fledged [WebAssembly] web application built with [Yew] including CRUD operations, authentication, routing, pagination, and more. It utilizes Yew's latest `function components` and `hooks`. It also supports desktop application powered by [Tauri].\n\nWe've gone to great lengths to adhere to the [Yew] community styleguides \u0026 best practices.\n\nFor more information on how to this works with other frontends/backends, head over to the [RealWorld] repo.\n\n## How it looks\n\nYou can view a live demo over at [Demo]\n\n| Home(Web) | Article(Web) |\n| :---:         |     :---:      |\n| ![Home](screenshots/home.png) | ![Article](screenshots/article.png) |\n\n| Edit(Desktop) | Sign Up(Desktop) |\n| :---:         |     :---:      |\n| ![Edit](screenshots/edit.png) | ![Sign Up](screenshots/sign_up.png) |\n\n## How it works\n\nThis is an application written in [Rust] that utilizes [Yew] and [WebAssembly] for developing the frontend web app that powers the RealWorld application.\n\nYou can view a full list of crates being used in [Cargo.toml], but here are some of the main ones of note:\n\n* [yew] - a modern Rust framework for creating multi-threaded frontend apps with WebAssembly.\n* [yew-router] - a routing library for the [Yew] framework.\n* [yew-hooks] - Hooks for the [Yew] web framework, inspired by react hook libs like [streamich/react-use] and [alibaba/hooks].\n* [lazy_static] - a macro for declaring lazily evaluated statics in Rust.\n* [parking_lot] - provides implementations of `Mutex`, `RwLock`, `Condvar` and `Once` etc.\n* [pulldown-cmark] - a pull parser for CommonMark, used to parse Markdown.\n* [serde] - a generic serialization/deserialization framework.\n* [chrono] - date and time library for Rust.\n\n## Getting started\n\n### With Docker\n\n```bash\ndocker-compose up\n```\n\nYou can visit `http://127.0.0.1:8080` in your browser now.\n\n### Manually\n\n* Install [Rust]\n* Install [wasm-pack]\n\n  ```bash\n  cargo install wasm-pack\n  ```\n\n* Install [trunk]\n\n* Build and develop\n\n  Copy `.env.example` to `.env`, and you can change the environment variables if you like.\n\n  ```bash\n  cp .env.example .env\n  cd crates/conduit-wasm \u0026\u0026 trunk serve\n  ```\n\n  You can visit `http://127.0.0.1:8080` in your browser now.\n* Build and release\n\n  ```bash\n  cd crates/conduit-wasm \u0026\u0026 trunk build\n  ```\n\n  You should find static files at `crates/conduit-wasm/dist` folder now, they are hosted in [gh-pages] branch as a demo.\n\n* Test\n\n  Install [chromedriver], run tests in headless browsers.\n\n  ```bash\n  wasm-pack test --headless --chrome\n  ```\n\n* Justfile\n  * Install [wasm-pack] `just install-wasm-pack`\n  * Copy `.env.example` to `.env` `just env`\n  * Trunk serve `just trunk-serve`\n  * Trunk build `just trunk-build`\n  * Test `just test`\n\n### With [Tauri] for desktop (optional)\n\n* Install [Tauri]\n\n  ```bash\n  cargo install tauri-cli\n  ```\n\n* Build and develop for desktop\n\n  ```bash\n  cargo tauri dev\n  ```\n\n* Build and release for desktop\n\n  ```bash\n  cargo tauri build\n  ```\n  \n* Justfile\n  * Install [Tauri] `just install-tauri`\n  * Build and develop `just tauri-dev`\n  * Build and release `just tauri-build`\n\n## Create Yew App\n\nThis project was bootstrapped with [Create Yew App], if you want to quickly setup a new Yew web app for your own, you might try [Create Yew App], an unofficial tool to set up a modern Yew web app by simply running one command.\n\n```bash\nnpx create-yew-app my-app\ncd my-app\ntrunk serve\n```\n\nJustfile:\n* Create-yew-app `just create-yew-app`\n* App-serve `just app-serve`\n\n## Contributing\n\nFeel free to take a look at the current issues in this repo for anything that currently needs to be worked on.\n\nYou are also welcome to open a PR or a new issue if you see something is missing or could be improved upon.\n\n## License\n\nApache License (Version 2.0)\n\nSee [LICENSE] for details\n\n[chromedriver]: http://chromedriver.chromium.org/downloads\n[chrono]: https://github.com/chronotope/chrono\n[Cargo.toml]: ./crates/conduit-wasm/Cargo.toml\n[Create Yew App]: https://github.com/jetli/create-yew-app\n[Demo]: https://jetli.github.io/rust-yew-realworld-example-app/\n[gh-pages]: https://github.com/jetli/rust-yew-realworld-example-app/tree/gh-pages\n[lazy_static]: https://github.com/rust-lang-nursery/lazy-static.rs\n[LICENSE]: ./LICENSE\n[parking_lot]: https://github.com/Amanieu/parking_lot\n[pulldown-cmark]: https://github.com/raphlinus/pulldown-cmark\n[RealWorld]: https://github.com/gothinkster/realworld\n[Rust]: https://www.rust-lang.org/\n[serde]: https://github.com/serde-rs/serde\n[WebAssembly]: https://webassembly.org\n[wasm-pack]: https://github.com/rustwasm/wasm-pack\n[Yew]: https://github.com/yewstack/yew\n[yew-router]: https://github.com/yewstack/yew\n[yew-hooks]: https://github.com/jetli/yew-hooks\n[streamich/react-use]: https://github.com/streamich/react-use\n[alibaba/hooks]: https://github.com/alibaba/hooks\n[Tauri]: https://github.com/tauri-apps/tauri\n[trunk]:https://trunkrs.dev\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjetli%2Frust-yew-realworld-example-app","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjetli%2Frust-yew-realworld-example-app","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjetli%2Frust-yew-realworld-example-app/lists"}