{"id":14961786,"url":"https://github.com/macalimlim/ftw","last_synced_at":"2025-07-19T10:02:55.278Z","repository":{"id":43736321,"uuid":"326562537","full_name":"macalimlim/ftw","owner":"macalimlim","description":"A CLI tool to manage your godot-rust projects","archived":false,"fork":false,"pushed_at":"2023-11-06T17:37:08.000Z","size":207,"stargazers_count":88,"open_issues_count":3,"forks_count":5,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-04-02T21:59:30.819Z","etag":null,"topics":["godot","godot-rust","rust"],"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/macalimlim.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"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":"2021-01-04T03:48:09.000Z","updated_at":"2025-01-02T22:53:05.000Z","dependencies_parsed_at":"2023-01-22T00:46:16.410Z","dependency_job_id":"713b4cb4-72ca-4dd7-b973-0df702e67399","html_url":"https://github.com/macalimlim/ftw","commit_stats":{"total_commits":153,"total_committers":2,"mean_commits":76.5,"dds":"0.013071895424836555","last_synced_commit":"e82bf8203621c5aa54c2ada26355ade2f55f9027"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/macalimlim%2Fftw","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/macalimlim%2Fftw/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/macalimlim%2Fftw/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/macalimlim%2Fftw/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/macalimlim","download_url":"https://codeload.github.com/macalimlim/ftw/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247773721,"owners_count":20993639,"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":["godot","godot-rust","rust"],"created_at":"2024-09-24T13:27:36.401Z","updated_at":"2025-04-08T04:17:25.389Z","avatar_url":"https://github.com/macalimlim.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ftw\n\u003e A CLI tool to manage your godot-rust project!\n\n## Table of contents\n* [General Information](#general-information)\n* [Setup](#setup)\n* [Usage](#usage)\n* [Project Configuration](#project-configuration)\n* [Contact](#contact)\n\n## General Information\nThis is a tool to help you manage your game project by providing commands to (1) create a project, (2) create a class, (3) create a singleton class, (4) build the library, (5) export your game, (6) run your project (and more to come in the future!). Its like [rails](https://rubyonrails.org/) but for game development :wink:.\n\n## Setup\nIt leverages tools like [godot, godot-headless, godot-server](https://godotengine.org/download) and [docker](https://www.docker.com/) (Optional, only used for cross compilation. See [below](#cross-compilation)) to make it all work! In Linux, you can install all godot, godot-headless and godot-server, on others only godot. For additional setup instructions, check the [wiki](https://github.com/macalimlim/godot-rust-template/wiki) of the default template.\n\n```shell\n$ cargo install ftw # to install\n$ cargo install --force ftw # to upgrade ftw\n```\n\n## Usage\n### ftw new \u0026lt;project-name\u0026gt; [template]\n#### Creates a new project directory\n```shell\n$ ftw new my-awesome-game # this creates a new project using the default template\n$ ftw new my-awesome-game default # same as above\n$ ftw new my-awesome-game /path/to/custom/template # creates a new project using a custom template\n$ ftw new my-awesome-game default v1.2.0 # creates a new project with the default template using a specified tag\n\n```\n\u003e Note: The custom template should have same structure as the [default template](https://github.com/macalimlim/godot-rust-template). Using a tag assumes you have created tags in your template repository, just like [here](https://github.com/macalimlim/godot-rust-template/releases)\n\n### ftw class \u0026lt;class-name\u0026gt; [node-type]\n#### Creates a class\n```shell\n$ ftw class MyHero # creates a class called `MyHero` that is deriving from `Node` as default\n$ ftw class MyHero Area2D # creates a class that derives from `Area2D`\n```\n\u003e Note: This creates the following files `rust/src/my_hero.rs`, `godot/scenes/MyHero.tscn` and `godot/native/MyHero.gdns` then adds the class inside `rust/src/lib.rs`. A complete list of node types can be found [here](https://github.com/macalimlim/ftw/blob/main/src/ftw_node_type.rs)\n\n#### Creates a tool class\n```shell\n$ ftw class MyButtonTool Button # creates a tool class called `MyButtonTool` that is deriving from `Button`\n```\n\u003e Note: Same as creating a regular class and also take note of having `Tool` at the end of the class name as a convention\n\n##### You could also organize rs, tscn and gdns files into submodules or subfolders\n```shell\n$ ftw class heros/marvel/avengers/IronMan Area2D # creates a class that derives from `Area2D`\n```\n\u003e Note: This creates the following files `rust/src/heros/marvel/avengers/iron_man.rs`, `godot/scenes/heros/marvel/avengers/IronMan.tscn`, `godot/native/heros/marvel/avengers/IronMan.gdns` and `mod.rs` files in each subfolder in `rust/src` then adds the class inside `rust/src/lib.rs`\n\n### ftw singleton \u0026lt;class-name\u0026gt;\n#### Creates a singleton class for autoloading\n```shell\n$ ftw singleton MySingleton # creates a class called `MySingleton` that derives from `Node`\n```\n\u003e Note: This creates the following `rust/src/my_singleton.rs` and `godot/native/MySingleton.gdns` then adds the class inside `rust/src/lib.rs`\n\n##### You can also organize the files into submodules/subfolders as in `ftw class` command\n```shell\n$ ftw singleton network/Network # creates a class called `Network` that derives from `Node`\n```\n\n### ftw build [targets] [build-type]\n#### Builds the library for a particular target\n```shell\n$ ftw build # builds the library for your current platform as target using `debug` as default\n$ ftw build linux-x86_64 # builds the library for the `linux-x86_64` platform using `debug` as default\n$ ftw build linux-x86_64 debug # same as above\n$ ftw build linux-x86_64 release # builds the library for the `linux-x86_64` platform using `release`\n$ ftw build linux-x86_64,macos-x86_64,macos-aarch64,windows-x86_64-gnu # this assumes cross compilation is enabled (see below)\n```\n#### [targets] can be separated by ',' and each target can be one of the following\n- android-aarch64\n- android-arm\n- android-x86\n- android-x86_64\n- ios-aarch64\n- linux-x86\n- linux-x86_64\n- macos-x86_64\n- macos-aarch64\n- windows-x86-gnu\n- windows-x86-msvc\n- windows-x86\n- windows-x86_64-gnu\n- windows-x86_64-msvc\n- windows-x86_64\n\n\u003e Note: The built libraries (*.so, *.dll, *.dylib, etc.) can be found inside the `lib/` folder\n\n### ftw export [targets] [build-type]\n#### Exports the game for a particular target\n```shell\n$ ftw export # exports the game for your current platform as target using `debug` as default\n$ ftw export linux-x86_64 # exports the game for the `linux-x86_64` platform using `debug` as default\n$ ftw export linux-x86_64 debug # same as above\n$ ftw export linux-x86_64 release # exports the game for the `linux-x86_64` platform using `release`\n$ ftw export linux-x86_64,macos-x86_64,macos-aarch64,windows-x86_64-gnu # this assumes cross compilation is enabled (see below)\n```\n\n\u003e Note: The exported games can be found inside the `bin/` folder. Before exporting an Android game, create the keystores first (if you have not created them and configured your editor/export settings) with 'cargo make create-debug-keystore' and/or 'cargo make create-release-keystore'. Before exporting Windows games, execute 'cargo make switch-gdnlib-msvc-to-gnu-entry' if you plan to export gnu targets, and execute 'cargo make switch-gdnlib-gnu-to-msvc-entry' if you plan to export msvc targets\n\n### ftw run [machine-type]\n#### Builds the library using `debug` then runs your game\n```shell\n$ ftw run # runs the game on desktop\n$ ftw run desktop # same as above\n$ ftw run server # runs the game as a server\n# enjoy! 😆\n```\n\n### ftw clean\n#### Cleans your project from excess artifacts, similar to `cargo clean`\n```shell\n$ ftw clean\n```\n\n## Project Configuration\n\nYou can create a `per-project` configuration file at your project root named `.ftw` with the following contents...\n\n### Custom Executables\n\nIf you have custom executables to run godot, for example if you have a shell/batch script which do some stuff first before running godot, you can configure using the following inside your project...\n\n```ini\n[ftw]\ngodot-exe=/path/to/custom/godot-script\ngodot-headless-exe=/path/to/custom/godot-headless-script\ngodot-server-exe=godot-server-script # assuming it's on $PATH\n```\n\n\u003e Note: Having the `.ftw` file and the keys inside it are all optional. If you don't provide them, the defaults (godot, godot-headless and godot-server) will be used. For Windows users use forward-slashes instead of back-slashes (e.g. godot-exe=D:/path/to/godot/bin/godot.windows.tools.64.exe)\n\n### Cross Compilation\n\nYou can also enable cross compilation, so you could build and export a game from and to any platform. It uses this [docker image](https://github.com/macalimlim/godot-rust-cross-compiler) to set up Linux, Android, Mac, iOS and Windows toolchains (WebAssembly toolchains to follow). Please read this [section](https://github.com/macalimlim/godot-rust-cross-compiler#bugs-and-limitations) to know what is currently supported.\n\n```ini\n[ftw]\nenable-cross-compilation=true\n```\n\n(Let's say) On your Linux machine\n\n```shell\n$ ftw build windows-x86_64-gnu\n$ ftw export windows-x86_64-gnu\n```\n\n## Contact\nMichael Angelo Calimlim `\u003cmacalimlim@gmail.com\u003e`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmacalimlim%2Fftw","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmacalimlim%2Fftw","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmacalimlim%2Fftw/lists"}