Skip to content

chore: bump from prerelease #237

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 13 commits into from
Feb 1, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 10 additions & 2 deletions .github/workflows/bevy_mod_scripting.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ jobs:
permissions:
pull-requests: write
contents: write
issues: write
name: Check - ${{ matrix.run_args.name }}
runs-on: ${{ matrix.run_args.os }}
# container: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest
Expand Down Expand Up @@ -93,17 +94,24 @@ jobs:
path: target/coverage/html/

- name: Update coverage badge
if: ${{ matrix.run_args.generates_coverage && github.ref == 'refs/heads/main' }}
if: ${{ matrix.run_args.generates_coverage }}
continue-on-error: true
run: |
git checkout -b chore/_update-coverage-badge || git checkout chore/_update-coverage-badge
cp target/coverage/html/badges/for_the_badge.svg badges/coverage.svg

git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
git config --global push.autoSetupRemote true
git add badges/coverage.svg

if [[ -n $(git status -s) ]]; then
git commit -m "chore(badge): Update coverage badge" -m "[skip ci]"
git push
git push -f
gh pr create --title "chore: Update coverage badge" --body "Updates coverage badge based on test results" --base ${{ github.ref }} --head chore/_update-coverage-badge > pr.txt
sed -n 's/.*pull\/\([0-9]*\).*/\1/p' pr.txt > pr_number.txt
PRNUMBER=$(cat pr_number.txt)
gh pr merge $PRNUMBER --squash
fi
generate_bindings:
name: Bindings - Synchronise
Expand Down
10 changes: 5 additions & 5 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "bevy_mod_scripting"
version = "0.9.0-alpha.9"
version = "0.9.0"
authors = ["Maksymilian Mozolewski <makspl17@gmail.com>"]
edition = "2021"
license = "MIT OR Apache-2.0"
Expand Down Expand Up @@ -53,15 +53,15 @@ rhai = ["bevy_mod_scripting_rhai"]
[dependencies]
bevy = { workspace = true }
bevy_mod_scripting_core = { workspace = true }
bevy_mod_scripting_lua = { path = "crates/languages/bevy_mod_scripting_lua", version = "0.9.0-alpha.9", optional = true }
bevy_mod_scripting_rhai = { path = "crates/languages/bevy_mod_scripting_rhai", version = "0.9.0-alpha.9", optional = true }
bevy_mod_scripting_lua = { path = "crates/languages/bevy_mod_scripting_lua", version = "0.9.0", optional = true }
bevy_mod_scripting_rhai = { path = "crates/languages/bevy_mod_scripting_rhai", version = "0.9.0", optional = true }
# bevy_mod_scripting_rune = { path = "crates/languages/bevy_mod_scripting_rune", version = "0.9.0-alpha.2", optional = true }
bevy_mod_scripting_functions = { workspace = true }
[workspace.dependencies]
profiling = { version = "1.0" }
bevy = { version = "0.15.0", default-features = false }
bevy_mod_scripting_core = { path = "crates/bevy_mod_scripting_core", version = "0.9.0-alpha.9" }
bevy_mod_scripting_functions = { path = "crates/bevy_mod_scripting_functions", version = "0.9.0-alpha.9", default-features = false }
bevy_mod_scripting_core = { path = "crates/bevy_mod_scripting_core", version = "0.9.0" }
bevy_mod_scripting_functions = { path = "crates/bevy_mod_scripting_functions", version = "0.9.0", default-features = false }

# test utilities
script_integration_test_harness = { path = "crates/script_integration_test_harness" }
Expand Down
6 changes: 3 additions & 3 deletions badges/coverage.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions crates/bevy_mod_scripting_core/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "bevy_mod_scripting_core"
version = "0.9.0-alpha.9"
version = "0.9.0"
authors = ["Maksymilian Mozolewski <makspl17@gmail.com>"]
edition = "2021"
license = "MIT OR Apache-2.0"
Expand Down Expand Up @@ -40,7 +40,7 @@ dashmap = "6"
smallvec = "1.11"
itertools = "0.13"
derivative = "2.2"
profiling = {workspace = true}
profiling = { workspace = true }
[dev-dependencies]
test_utils = { workspace = true }

Expand Down
4 changes: 2 additions & 2 deletions crates/bevy_mod_scripting_functions/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "bevy_mod_scripting_functions"
version = "0.9.0-alpha.9"
version = "0.9.0"
edition = "2021"
authors = ["Maksymilian Mozolewski <makspl17@gmail.com>"]
license = "MIT OR Apache-2.0"
Expand Down Expand Up @@ -30,7 +30,7 @@ bevy = { workspace = true, features = [
"file_watcher",
"multi_threaded",
] }
profiling = {workspace = true}
profiling = { workspace = true }
uuid = "1.11"
smol_str = "0.2.2"
bevy_mod_scripting_core = { workspace = true }
Expand Down
4 changes: 2 additions & 2 deletions crates/languages/bevy_mod_scripting_lua/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "bevy_mod_scripting_lua"
version = "0.9.0-alpha.9"
version = "0.9.0"
authors = ["Maksymilian Mozolewski <makspl17@gmail.com>"]
edition = "2021"
license = "MIT OR Apache-2.0"
Expand Down Expand Up @@ -45,7 +45,7 @@ parking_lot = "0.12.1"
uuid = "1.1"
smol_str = "0.2.2"
smallvec = "1.13"
profiling = {workspace = true}
profiling = { workspace = true }

[dev-dependencies]
script_integration_test_harness = { workspace = true }
Expand Down
2 changes: 1 addition & 1 deletion crates/languages/bevy_mod_scripting_rhai/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "bevy_mod_scripting_rhai"
version = "0.9.0-alpha.9"
version = "0.9.0"
authors = ["Maksymilian Mozolewski <makspl17@gmail.com>"]
edition = "2021"
license = "MIT OR Apache-2.0"
Expand Down
5 changes: 4 additions & 1 deletion docs/src/Summary/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,10 @@ Choose the language features you wish enabled and add them to the features block
The next step is to add the BMS plugin to your application, on top of any other extras you want included in your app:

```rust,ignore
app.add_plugins(LuaScriptingPlugin::default());
app.add_plugins((
LuaScriptingPlugin::default(),
ScriptFunctionsPlugin
));
```

The above is how you'd setup BMS for Lua, if you want to use another language, simply use a corresponding plugin from the integration crate.
Expand Down
28 changes: 28 additions & 0 deletions release-notes/0.9.0.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# [`bevy_mod_scripting`](https://github.com/makspll/bevy_mod_scripting/) 0.9.0 is out!

![image](https://github.com/user-attachments/assets/6ae0f927-ea1b-4d90-a809-4cc513e49b18)

## Summary
- The entire crate was completely re-written
- We cut down the number of crates, moving most common functionality into the core crate and removing all the horrible macros
- All of the systems have been made more robust and testable
- The crate is now completely panic free!
- The script lifecycle is automatically tied to script assets, loading and unloading assets and placing `ScriptComponent`'s on entities is all you need to do to manage the complexities of creating, updating, deleting and hot-loading script state.
- A new `ScriptValue` abstraction allows us to centrally define and register dynamic script functions which automatically register their type dependencies with the `AppTypeRegistry`
- New language implementations do not need to re-implement all of the bevy bindings, they simply need to provide a dynamic calling mechanism, and dispatch operators to the right functions
- Bevy bindings generation is completely decoupled from `mlua`, in fact the BMS crate gets injected into the process of compiling `bevy` and in doing so we can look for types which implement `IntoScript` and `FromScript`, allowing us to react to changes in those trait implementations in picking which functions to generate registrations for.
- The `APIProvider` traits as well as the `API` terminology were gotten rid of in favour of configuration resources with stored function pointers, as well as more specific `bindings` terminology
- We now publish a brand new [book](https://makspll.github.io/bevy_mod_scripting/), which should help onboard new consumers and make the crate much easier to use!
- The entire dev experience has been transformed thanks to the `xtask` pattern, contributing to `BMS` has never been easier!

## Removed
- We removed `tealr` and the `teal` integration, meaning interacting with Lua is much simpler.

## On pause
- We put documentation generation features as well as `rune` support on pause, to accelerate going forward. But there is nothing stopping us from re-implementing those features, and in fact generating documentation will be infinitely easier given we have trait level access to all dynamic functions!

## Migration Guide
I am not publishing a migration guide, simply because the easiest way to migrate to 0.9.0 is to start from scratch! EVERYTHING is different, and hence I'd reccomend walking through the docs, and re-implenenting the crate.

## Changelog
See a detailed changelog [here](https://github.com/makspll/bevy_mod_scripting/blob/main/CHANGELOG.md)
Loading