Crates.io | bevy_api_gen |
lib.rs | bevy_api_gen |
version | 0.6.0 |
source | src |
created_at | 2022-08-03 00:09:00.469054 |
updated_at | 2024-04-04 16:03:52.395663 |
description | Code generator tool for bevy |
homepage | |
repository | https://github.com/makspll/bevy_mod_scripting |
max_upload_size | |
id | 637647 |
size | 162,179 |
This crate is a part of the "bevy_mod_scripting" workspace.
bevy_api_gen is a Cargo plugin that generates reflection-powered wrappers for Bevy types. It can list Reflect types in a workspace and perform arbitrary codegen using Tera templates.
To install bevy_api_gen, use the following command:
cargo +nightly-2024-01-24 install bevy_api_gen
To run the main codegen process, use the following command:
cargo +nightly-2024-01-24 bevy-api-gen generate
This will perform all parts of the process and generate meta as well as .rs files for each crate in your workspace in your /target/plugin-nightly-2024-01-24/bevy_api_gen
directory
After generating all the files, you can 'collect' them in a mod.rs file like so:
cargo +nightly-2024-01-24 bevy-api-gen collect
To see a list of all Reflect
implementing types in your workspace run:
cargo +nightly-2024-01-24 bevy-api-gen list-types > all_types.txt
To see the list of all templates which you can override use:
cargo +nightly-2024-01-24 bevy-api-gen list-templates
You can also print any of the templates to stdout:
cargo +nightly-2024-01-24 bevy-api-gen print item.tera