{"id":17277751,"url":"https://github.com/taurr/bevy-template-rs","last_synced_at":"2025-04-14T09:15:37.537Z","repository":{"id":37867687,"uuid":"443622865","full_name":"taurr/bevy-template-rs","owner":"taurr","description":"Cargo-generate template for Bevy projects","archived":false,"fork":false,"pushed_at":"2022-11-20T20:34:47.000Z","size":573,"stargazers_count":27,"open_issues_count":1,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-14T09:15:25.091Z","etag":null,"topics":["bevy","cargo-generate","rust","template"],"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/taurr.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE-APACHE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-01-01T20:59:34.000Z","updated_at":"2025-03-03T19:28:58.000Z","dependencies_parsed_at":"2023-01-21T12:30:11.551Z","dependency_job_id":null,"html_url":"https://github.com/taurr/bevy-template-rs","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/taurr%2Fbevy-template-rs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/taurr%2Fbevy-template-rs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/taurr%2Fbevy-template-rs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/taurr%2Fbevy-template-rs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/taurr","download_url":"https://codeload.github.com/taurr/bevy-template-rs/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248852184,"owners_count":21171842,"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":["bevy","cargo-generate","rust","template"],"created_at":"2024-10-15T09:09:52.615Z","updated_at":"2025-04-14T09:15:37.495Z","avatar_url":"https://github.com/taurr.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Bevy-template-rs\n\nThis is a small but feature rich set of [cargo-generate] templates for use when creating [Bevy] applications.\n\n## Templates/Features\n\n- **Binary template for the main game binary.**\n  \n  - Complete with camera setup, a very small 2D or 3D system and debug diagnostics.\n  - Includes integration test support - Small test with Bevy in headless mode.\n  - Optionally includes setup of [vscode tasks].\n  - Cargo runner configured to use [WASM Server Runner] in case of WASM target (`wasm32-unknown-unknown`)\n    - Starting the WASM development server using the optional [vscode tasks] uses [cargo-watch].\n  - Will utilize *fast compiles* as described in [The Bevy Book] when built using the [vscode tasks] (*not for WASM target*). \n      - if not using [vscode], just use `cargo build --features bevy/dynamic`.\n  - If enabling the feature `inspector`, the project will attempt to use [bevy-inspector-egui] (works with WASM).\n  - If enabling the feature `editor`, the project will attempt to use [bevy_editor_pls].\n  - WASM target goes fullscreen (or rather window)\n  - Adjusts if expanded inside a existing cargo project.\n\n\n- **Library template for a small library crate.**\n  \n  - Includes integration test support - Small test with Bevy in headless mode.  \n  - Optionally includes setup of [vscode tasks].\n  - Adjusts if expanded inside a existing cargo project.\n\n- **Minimal template**\n  \n  - Minimal application template. Really only the basics for a project (Though still with WASM support).\n\n- **Workflow template.**\n\n  - Add a copy of the [Official Bevy Workflow template] to an existing project.\n  - Template requires [cargo-generate] to be invoked with the `--init` parameter as it is *not inteded as a complete project*. The template must be expanded inside an existing project.\n\n## Usage\n\nTo expand e.g a binary project, use:\n```shell\ncargo generate taurr/bevy-template-rs Binary\n```\n\nTo include Github workflow files, use:\n```shell\ncd \u003cPROJECT_DIR\u003e\ncargo generate taurr/bevy-template-rs Workflow --init --name \u003cBINARY NAME\u003e\n```\n\nWhy the `--init` parameter? Well thats just to tell [cargo-generate] *not* to create a folder for the generated files.\n\nFor further usage, or if having issues with `cargo-generate`, please have a look in the [cargo-generate book](https://cargo-generate.github.io/cargo-generate/index.html).\n\n\n![Template expansion](./assets/template-expansion.gif)\n\n## Requirements\n\n[cargo-generate] must be installed. The easiest way to do this is:\n\n```shell\ncargo install cargo-generate\n```\n\n## :bulb: Tips'n'tricks\n\nIf the template is used on a regular basis, [cargo-generate] allows to setup favorite templates and default variables.\n\nTo do this, open or create the file `$CARGO_HOME/cargo-generate.toml`, insert this:\n```toml\n[values]\ngh_username = \"\u003cYOUR GITHUB USERNAME\u003e\"\nide = \"vscode|none\"\n\n[favorites.bevy-bin]\ngit = \"https://github.com/taurr/bevy-template-rs\"\nsubfolder = \"Binary\"\n\n[favorites.bevy-lib]\ngit = \"https://github.com/taurr/bevy-template-rs\"\nsubfolder = \"Library\"\n\n[favorites.bevy-wf]\ngit = \"https://github.com/taurr/bevy-template-rs\"\nsubfolder = \"Workflow\"\nis_init = true\n```\n\nAfter this, the template can be expanded using `cargo generate bevy-bin`, `cargo generate bevy-lib` or `cargo generate bevy-wf`.\n\n:warning: Adding the workflow template through this favorite will no longer require the `--init` parameter, and thus will always expand in the current directory!\n\n[Bevy]:https://bevyengine.org\n[cargo-generate]:https://github.com/cargo-generate/cargo-generate\n[bevy_editor_pls]:https://github.com/jakobhellermann/bevy_editor_pls\n[The Bevy Book]:https://bevyengine.org/learn/book\n[Official Bevy Workflow template]:https://github.com/bevyengine/bevy_github_ci_template\n[WASM Server Runner]: https://github.com/jakobhellermann/wasm-server-runner\n[vscode]: https://code.visualstudio.com\n[vscode tasks]: https://code.visualstudio.com/Docs/editor/tasks\n[cargo-watch]: https://github.com/watchexec/cargo-watch\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftaurr%2Fbevy-template-rs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftaurr%2Fbevy-template-rs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftaurr%2Fbevy-template-rs/lists"}