19 unstable releases (8 breaking)

new 0.9.0-alpha.4 Jan 17, 2025
0.8.0 Dec 3, 2024
0.8.0-alpha.1 Nov 10, 2024
0.6.0 Apr 4, 2024
0.1.2 Oct 8, 2022

#435 in Game dev

Download history 23/week @ 2024-09-27 6/week @ 2024-10-04 6/week @ 2024-10-11 4/week @ 2024-10-18 2/week @ 2024-10-25 238/week @ 2024-11-01 235/week @ 2024-11-08 24/week @ 2024-11-15 10/week @ 2024-11-22 237/week @ 2024-11-29 64/week @ 2024-12-06 21/week @ 2024-12-13 7/week @ 2024-12-20 25/week @ 2024-12-27 181/week @ 2025-01-03 101/week @ 2025-01-10

315 downloads per month

MIT/Apache

1.5MB
35K SLoC


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 temporarilly on hold[^1]
Rune temporarilly on hold[^1]

Documentation

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

[^1]: Due to the recent re-write of the crate, documentation generation as well as rhai and rune support are temporarilly on hold. They will likely be re-implemented in the future. Rhai in particualar is difficult to re-implement due to a lack of support for first-class-functions.

Dependencies

~54–87MB
~1.5M SLoC