Skip to content

Commit

Permalink
Try #874:
Browse files Browse the repository at this point in the history
  • Loading branch information
bors[bot] committed Mar 16, 2022
2 parents 61946a7 + 8cfc2ef commit 2591a5a
Show file tree
Hide file tree
Showing 30 changed files with 290 additions and 440 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/full-ci.yml
Expand Up @@ -32,7 +32,7 @@ env:

# Local variables
# Note: using variables is limited at the moment, see https://github.com/actions/runner/issues/480
GDRUST_FEATURES: "gdnative/async,gdnative/serde"
GDRUST_FEATURES: "gdnative/async,gdnative/serde,gdnative_bindings_generator/debug"
CARGO_DENY_VERSION: "0.11.0"
CARGO_DINGHY_VERSION: "0.4.68"

Expand Down Expand Up @@ -249,13 +249,13 @@ jobs:
include:
# Latest Godot with different Rust versions
- rust: stable
godot: "3.4.1"
godot: "3.4.3"
postfix: ''
- rust: nightly
godot: "3.4.1"
godot: "3.4.3"
postfix: ' (nightly)'
- rust: '1.56'
godot: "3.4.1"
godot: "3.4.3"
postfix: ' (msrv 1.56)'

# Test with oldest supported engine version
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/minimal-ci.yml
Expand Up @@ -13,6 +13,8 @@ env:
# Local variables
# Note: using variables is limited at the moment, see https://github.com/actions/runner/issues/480
GODOT_VER: "3.4.1"

# Don't use more features like "gdnative_bindings_generator/debug" to keep CI truly minimal
GDRUST_FEATURES: "gdnative/async,gdnative/serde"

on:
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/release-version.yml
Expand Up @@ -8,7 +8,8 @@ on:
- '0.10.[0-9]+-?*'

env:
GDRUST_FEATURES: "gdnative/async,gdnative/serde"
# Note: used for test and clippy, not for publish
GDRUST_FEATURES: "gdnative/async,gdnative/serde,gdnative_bindings_generator/debug"

# Crates to publish -- important, this doesn't work when there are spaces in any of the paths!
GDRUST_CRATES: >
Expand Down
12 changes: 10 additions & 2 deletions CHANGELOG.md
Expand Up @@ -5,7 +5,7 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [0.10.0] - unreleased
## [0.10.0]

### Added

Expand Down Expand Up @@ -47,7 +47,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Rust edition is now 2021 ([#870](https://github.com/godot-rust/godot-rust/pull/870))
- `euclid` vector library replaced with `glam`, no longer part of public API ([#713](https://github.com/godot-rust/godot-rust/pull/713))
- `Variant` has now a redesigned conversion API ([#819](https://github.com/godot-rust/godot-rust/pull/819))
- Type renames (815, 828)
- Type renames ([#815](https://github.com/godot-rust/godot-rust/pull/815), [#828](https://github.com/godot-rust/godot-rust/pull/828))
- `RefInstance` -> `TInstance`
- `RefKind` -> `Memory`
- `ThreadAccess` -> `Ownership`
Expand All @@ -64,6 +64,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Geometric types API consistency ([#827](https://github.com/godot-rust/godot-rust/pull/827))
- Rename basis vectors `x, y, z` -> `a, b, c`
- Pass by value/ref consistency
- `Plane` invariants ([#874](https://github.com/godot-rust/godot-rust/pull/874))
- Other changes (see PRs)
- Method renames
- `{String,Variant}::forget()` -> `leak()` ([#828](https://github.com/godot-rust/godot-rust/pull/828))
Expand All @@ -72,6 +73,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- `Basis::to_scale()` -> `scale()`
- `Basis::from_elements()` -> `from_rows()`
- `Transform2D::from_axis_origin()` -> `from_basis_origin()`
- `StringName::get_name()` -> `to_godot_string()` ([#874](https://github.com/godot-rust/godot-rust/pull/874))
- `Plane::intersects_*()` -> `intersect_*()` ([#874](https://github.com/godot-rust/godot-rust/pull/874))
- `Plane::normalize()` -> `normalized()`
- `Plane::has_point()` -> `contains_point()` + `contains_point_eps()`
- Relax `Dictionary` key bounds: `ToVariant` -> `OwnedToVariant` ([#809](https://github.com/godot-rust/godot-rust/pull/809))
- `#[inherit]` is now optional and defaults to `Reference` ([#705](https://github.com/godot-rust/godot-rust/pull/705))
- `Instance` and `TInstance` now use `Own=Shared` by default ([#823](https://github.com/godot-rust/godot-rust/pull/823))
Expand All @@ -98,6 +103,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- access methods for `VariantArray<Shared>` ([#795](https://github.com/godot-rust/godot-rust/pull/795))
- `Basis::invert()`, `orthonormalize()`, `rotate()`, `tdotx()`, `tdoty()`, `tdotz()` ([#827](https://github.com/godot-rust/godot-rust/pull/827))
- `Rid::operator_less()` ([#844](https://github.com/godot-rust/godot-rust/pull/844))
- `StringName::operator_less()` ([#874](https://github.com/godot-rust/godot-rust/pull/874))
- Macros and attributes
- `#[property(before_get|before_set|after_get|after_set)]`, replaced with `#[property(get|set)]` ([#874](https://github.com/godot-rust/godot-rust/pull/874))
- From `prelude`
- macros`godot_gdnative_init`, `godot_gdnative_terminate`, `godot_nativescript_init`, `godot_site` ([#811](https://github.com/godot-rust/godot-rust/pull/811))

Expand Down
8 changes: 4 additions & 4 deletions README.md
Expand Up @@ -14,7 +14,7 @@

The bindings cover most of the exposed API of Godot 3.4, and are being used on a number of projects in development, but we still expect non-trivial breaking changes in the API in the coming releases. godot-rust adheres to [Cargo's semantic versioning](https://doc.rust-lang.org/cargo/reference/semver.html).

Minimum supported Rust version (MSRV) is **1.56**.
Minimum supported Rust version (MSRV) is **1.56**. We use the Rust 2021 Edition.

## Engine compatibility

Expand All @@ -38,7 +38,7 @@ This is the recommended way of using godot-rust. After `bindgen` dependencies an

```toml
[dependencies]
gdnative = "0.10.0-rc.0"
gdnative = "0.10"

[lib]
crate-type = ["cdylib"]
Expand Down Expand Up @@ -71,7 +71,7 @@ A typical use case is to expose your own _Native Class_, a Rust API that can be

This happens via dynamic libraries and the _GDNative interface_, which will be loaded from Godot. The necessary wiring is done behind the scenes by godot-rust. A simple "Hello world" application could look like this:

```rs
```rust
use gdnative::prelude::*;

#[derive(NativeClass)]
Expand Down Expand Up @@ -104,7 +104,7 @@ godot_init!(init);
>
> Before launching the examples in the Godot editor, you must first run `cargo build` and wait for the build operations to finish successfully.
>
>At startup, the Godot editor tries to load all resources used by the project, including the native library. If the latter isn't present, the editor will skip properties or signals associated with the missing native scripts in the scene. This will cause the scene tree to be non-functional for any sample that relies on properties or signals configured in the editor.
>At startup, the Godot editor tries to load all resources used by the project, including the native library. If the latter isn't present, the editor will skip properties or signals associated with the missing native scripts in the scene. This causes the scene tree to be non-functional for any sample that relies on properties or signals configured in the editor.
The [/examples](https://github.com/godot-rust/godot-rust/tree/master/examples) directory contains several ready to use examples, complete with Godot projects and setup for easy compilation from Cargo:

Expand Down
4 changes: 2 additions & 2 deletions bindings-generator/Cargo.toml
Expand Up @@ -6,7 +6,7 @@ documentation = "https://docs.rs/crate/gdnative_bindings_generator"
repository = "https://github.com/godot-rust/godot-rust"
homepage = "https://godot-rust.github.io/"
license = "MIT"
version = "0.10.0-rc.0"
version = "0.10.0"
workspace = ".."
edition = "2021"
rust-version = "1.56"
Expand All @@ -21,7 +21,7 @@ memchr = "2"
miniserde = "0.1.10"
proc-macro2 = "1"
quote = "1"
regex = "1.5.5" # for security: https://blog.rust-lang.org/2022/03/08/cve-2022-24713.html
regex = { version = "1.5.5", default-features = false } # for security: https://blog.rust-lang.org/2022/03/08/cve-2022-24713.html
roxmltree = "0.14"
syn = { version = "1", features = ["full", "extra-traits", "visit"] }
unindent = "0.1.5"
Expand Down
2 changes: 1 addition & 1 deletion bindings-generator/src/lib.rs
Expand Up @@ -225,7 +225,7 @@ pub(crate) mod test_prelude {

let api = Api::new(include_str!("../../gdnative-bindings/api.json"));
let mut buffer = BufWriter::new(Vec::with_capacity(16384));
for class in api.classes {
for class in &api.classes {
let mut icalls = HashMap::new();

let code = generate_module_doc(&class);
Expand Down
4 changes: 4 additions & 0 deletions check.sh
Expand Up @@ -22,6 +22,7 @@ for arg in "${args[@]}"; do
echo " test run unit tests (no Godot)"
echo " itest run integration tests (Godot)"
echo " doc generate docs for 'gdnative' crate"
echo " dok generate docs and open in browser"
echo ""
echo "Examples:"
echo " check.sh fmt clippy"
Expand Down Expand Up @@ -82,6 +83,9 @@ for arg in "${args[@]}"; do
doc)
cmds+=("cargo doc --lib -p gdnative --no-deps --features $features")
;;
dok)
cmds+=("cargo doc --lib -p gdnative --no-deps --features $features --open")
;;
*)
echo "Unrecognized command '$arg'"
exit 2
Expand Down
2 changes: 1 addition & 1 deletion examples/array-export/Cargo.toml
@@ -1,5 +1,5 @@
[package]
name = "array_export"
name = "array-export"
version = "0.1.0"
authors = ["The godot-rust developers"]
edition = "2021"
Expand Down
2 changes: 1 addition & 1 deletion examples/dodge-the-creeps/Cargo.toml
@@ -1,5 +1,5 @@
[package]
name = "dodge_the_creeps"
name = "dodge-the-creeps"
version = "0.1.0"
authors = ["The godot-rust developers"]
publish = false
Expand Down
2 changes: 1 addition & 1 deletion examples/hello-world/Cargo.toml
@@ -1,5 +1,5 @@
[package]
name = "hello_world"
name = "hello-world"
version = "0.1.0"
authors = ["The godot-rust developers"]
publish = false
Expand Down
2 changes: 1 addition & 1 deletion examples/native-plugin/Cargo.toml
@@ -1,5 +1,5 @@
[package]
name = "native_plugin"
name = "native-plugin"
version = "0.1.0"
authors = ["The godot-rust developers"]
edition = "2021"
Expand Down
2 changes: 1 addition & 1 deletion examples/scene-create/Cargo.toml
@@ -1,5 +1,5 @@
[package]
name = "scene_create"
name = "scene-create"
version = "0.1.0"
authors = ["The godot-rust developers"]
publish = false
Expand Down
2 changes: 1 addition & 1 deletion examples/spinning-cube/Cargo.toml
@@ -1,5 +1,5 @@
[package]
name = "spinning_cube"
name = "spinning-cube"
version = "0.1.0"
authors = ["The godot-rust developers"]
edition = "2021"
Expand Down
8 changes: 4 additions & 4 deletions gdnative-async/Cargo.toml
Expand Up @@ -5,7 +5,7 @@ description = "Runtime async support for godot-rust."
documentation = "https://docs.rs/crate/gdnative-async"
repository = "https://github.com/godot-rust/godot-rust"
homepage = "https://godot-rust.github.io/"
version = "0.10.0-rc.0"
version = "0.10.0"
license = "MIT"
workspace = ".."
edition = "2021"
Expand All @@ -14,9 +14,9 @@ rust-version = "1.56"
[features]

[dependencies]
gdnative-derive = { path = "../gdnative-derive", version = "=0.10.0-rc.0" }
gdnative-core = { path = "../gdnative-core", version = "=0.10.0-rc.0" }
gdnative-bindings = { path = "../gdnative-bindings", version = "=0.10.0-rc.0" }
gdnative-derive = { path = "../gdnative-derive", version = "=0.10.0" }
gdnative-core = { path = "../gdnative-core", version = "=0.10.0" }
gdnative-bindings = { path = "../gdnative-bindings", version = "=0.10.0" }
atomic-waker = "1"
crossbeam-channel = "0.5"
crossbeam-utils = "0.8"
Expand Down
8 changes: 4 additions & 4 deletions gdnative-bindings/Cargo.toml
Expand Up @@ -5,7 +5,7 @@ description = "The Godot game engine's automatcally generated bindings to Godot
documentation = "https://docs.rs/crate/gdnative-bindings"
repository = "https://github.com/godot-rust/godot-rust"
homepage = "https://godot-rust.github.io/"
version = "0.10.0-rc.0"
version = "0.10.0"
license = "MIT"
workspace = ".."
edition = "2021"
Expand All @@ -17,10 +17,10 @@ one-class-one-file = []
custom-godot = ["gdnative_bindings_generator/custom-godot"]

[dependencies]
gdnative-sys = { path = "../gdnative-sys", version = "=0.10.0-rc.0" }
gdnative-core = { path = "../gdnative-core", version = "=0.10.0-rc.0" }
gdnative-sys = { path = "../gdnative-sys", version = "=0.10.0" }
gdnative-core = { path = "../gdnative-core", version = "=0.10.0" }
bitflags = "1"
libc = "0.2"

[build-dependencies]
gdnative_bindings_generator = { path = "../bindings-generator", version = "=0.10.0-rc.0" }
gdnative_bindings_generator = { path = "../bindings-generator", version = "=0.10.0" }
6 changes: 3 additions & 3 deletions gdnative-core/Cargo.toml
Expand Up @@ -5,7 +5,7 @@ description = "The Godot game engine's gdnative core bindings."
documentation = "https://docs.rs/crate/gdnative-core"
repository = "https://github.com/godot-rust/godot-rust"
homepage = "https://godot-rust.github.io/"
version = "0.10.0-rc.0"
version = "0.10.0"
license = "MIT"
workspace = ".."
edition = "2021"
Expand All @@ -17,8 +17,8 @@ gd-test = []
type-tag-fallback = []

[dependencies]
gdnative-sys = { path = "../gdnative-sys", version = "=0.10.0-rc.0" }
gdnative-impl-proc-macros = { path = "../impl/proc-macros", version = "=0.10.0-rc.0" }
gdnative-sys = { path = "../gdnative-sys", version = "=0.10.0" }
gdnative-impl-proc-macros = { path = "../impl/proc-macros", version = "=0.10.0" }
ahash = "0.7.6"
approx = "0.5"
atomic-take = "1"
Expand Down

0 comments on commit 2591a5a

Please sign in to comment.