31 releases

new 0.9.6 Feb 15, 2025
0.9.0-alpha.9 Jan 28, 2025
0.8.0 Dec 3, 2024
0.8.0-alpha.1 Nov 10, 2024
0.1.2 Oct 8, 2022

#135 in Game dev

Download history 116/week @ 2024-10-28 298/week @ 2024-11-04 72/week @ 2024-11-11 20/week @ 2024-11-18 5/week @ 2024-11-25 280/week @ 2024-12-02 28/week @ 2024-12-09 15/week @ 2024-12-16 9/week @ 2024-12-23 126/week @ 2024-12-30 93/week @ 2025-01-06 361/week @ 2025-01-13 279/week @ 2025-01-20 510/week @ 2025-01-27 448/week @ 2025-02-03 434/week @ 2025-02-10

1,821 downloads per month

MIT/Apache

1.5MB
35K SLoC

[^2] [^3]

Bevy Scripting

Although Bevy doesn't directly support scripting, efforts are underway to incorporate it. This crate represents an initial attempt to enable scripting within Bevy's existing framework. It's important to note that this is a work in progress and not yet optimized or complete. As Bevy evolves, significant changes to this API are anticipated.

Why Use Scripts?

  • Update your game mechanics without the need for re-compiling
  • Encapsulating game logic in scripts paves way for modders to create custom content easilly
  • Scripting game logic/UI in a simpler language broadens development accessibility to non-programmers on your team

Features

  • Script management via commands
  • Hot loading
  • Support for multiple scripting languages
  • All script bindings managed in one place (ScriptDynamicFunctionRegistry)
  • Customizable event driven communication between bevy and scripts (on_update, on_init etc..)
  • Automatically generated bevy bindings
  • Documentation generation temporarilly on hold[^1]

Support

The languages currently supported are as follows:

Language
Lua
Lua51
Lua52
Lua53
Lua54
Luajit
Luajit52
Luau
Rhai
Rune temporarilly on hold[^1]

Documentation

For examples, installation and usage instructions see our shiny new book

Bevy Compatibility

BMS generates code based on each bevy release, which is why we pin the patch version of bevy too.

bevy_mod_scripting bevy
0.9.5+ 0.15.2
0.9.1+ 0.15.1
0.9 0.15.0
0.8 0.15.0
0.7 0.14
0.6 0.13.1

Supported Platforms

platform is supported?
Windows yes
Linux yes
MacOS yes
WASM no, see this issue

[^1]: Due to the recent re-write of the crate, documentation generation as well as rune support are temporarilly on hold. They will likely be re-implemented in the future.

[^2]: the coverage does not include generated bindings.

[^3]: The crate strictly enforces no unwrap, expect, panic or todo's via clippy lints.

Dependencies

~56–89MB
~1.5M SLoC