Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Migration Guide

Occasionally changes are made to the Bevy CLI that may break existing projects, or majorly change how it is intended to be used. This document provides a guide recommending how to upgrade your existing project to a newer version of the CLI.

To actually install the new version of the CLI, please see the docs and the releases page. Note that some changes listed here are optional (and will be explicitly marked as such). If you ever run into issues while upgrading, please feel free to submit an issue.

v0.1.0-alpha.1 to v0.1.0-alpha.2 (Unreleased)

Make --no-default-features a Toggle

The --no-default-features flag for bevy build and bevy run is now a toggle instead of an option. If you previously were using --no-default-features true, replace it with just --no-default-features. If you were using --no-default-features false, remove it.

# v0.1.0-alpha.1
bevy build --no-default-features true
bevy run --no-default-features false

# v0.1.0-alpha.2
bevy build --no-default-features
bevy run

--wasm-opt needs a value

You now need to provide an explicit value to the --wasm-opt flag. If you were using --wasm-opt you now need to use --wasm-opt=true.

# v0.1.0-alpha.1
bevy build web --wasm-opt

# v0.1.0-alpha.2
bevy build web --wasm-opt=true

On the flip side, you can now customize the flags that are passed to wasm-opt:

# v0.1.0-alpha.2
bevy build web --wasm-opt=-Oz --wasm-opt=--enable-bulk-memory

Reorganized commands

If you are using the Bevy CLI as a library, a couple of import paths will have changed. All commands have been moved to the commands module and need to be imported from there.

Note also that the template module has been renamed to new and also moved to commands. The generate_template function within has been renamed to new and now takes NewArgs as parameter.