Skip to content

Commit e131df2

Browse files
bors[bot]ironpeakBromeon
authored
Merge #883
883: Property support for std collection types r=Bromeon a=ironpeak Implemented the `Export` trait for `HashMap`, `HashSet` (new) and `Vec` so that they can be exported. The PR also includes an example project using the types as properties. Co-authored-by: Hrafn Orri Hrafnkelsson <HrafnOrri@BitCrow.net> Co-authored-by: Jan Haller <bromeon@gmail.com>
2 parents 2560d1d + 599ab91 commit e131df2

22 files changed

+351
-24
lines changed

Cargo.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@ members = [
1616
"examples/resource",
1717
"examples/native-plugin",
1818
"examples/rpc",
19-
"examples/array-export",
19+
"examples/builder-export",
20+
"examples/property-export",
2021
"impl/proc-macros"
2122
]
2223

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,8 @@ The [/examples](https://github.com/godot-rust/godot-rust/tree/master/examples) d
111111
- [**hello-world**](https://github.com/godot-rust/godot-rust/tree/master/examples/hello-world) - Your first project, writes to the console.
112112
- [**spinning-cube**](https://github.com/godot-rust/godot-rust/tree/master/examples/spinning-cube) - Spin our own node in place, exposing editor properties.
113113
- [**scene-create**](https://github.com/godot-rust/godot-rust/tree/master/examples/scene-create) - Load, instance and place scenes using Rust code.
114-
- [**array-export**](https://github.com/godot-rust/godot-rust/tree/master/examples/array-export) - Export more complex properties (here arrays) from Rust.
114+
- [**builder-export**](https://github.com/godot-rust/godot-rust/tree/master/examples/builder-export) - Export using the builder API.
115+
- [**property-export**](https://github.com/godot-rust/godot-rust/tree/master/examples/property-export) - Export complex properties such as collections.
115116
- [**dodge-the-creeps**](https://github.com/godot-rust/godot-rust/tree/master/examples/dodge-the-creeps) - A Rust port of the [little Godot game](https://docs.godotengine.org/en/stable/getting_started/step_by_step/your_first_game.html).
116117
- [**signals**](https://github.com/godot-rust/godot-rust/tree/master/examples/signals) - Connect and emit signals.
117118
- [**resource**](https://github.com/godot-rust/godot-rust/tree/master/examples/resource) - Create and use custom resources.

examples/array-export/array_export_library.gdnlib

Lines changed: 0 additions & 17 deletions
This file was deleted.

examples/array-export/Cargo.toml renamed to examples/builder-export/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[package]
2-
name = "array-export"
2+
name = "builder-export"
33
version = "0.1.0"
44
authors = ["The godot-rust developers"]
55
edition = "2021"

examples/array-export/ExportsArrays.gdns renamed to examples/builder-export/ExportsArrays.gdns

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[gd_resource type="NativeScript" load_steps=2 format=2]
22

3-
[ext_resource path="res://array_export_library.gdnlib" type="GDNativeLibrary" id=1]
3+
[ext_resource path="res://builder_export_library.gdnlib" type="GDNativeLibrary" id=1]
44

55
[resource]
66
resource_name = "ExportsArrays"
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
[entry]
2+
3+
X11.64="res://../../target/debug/libbuilder_export.so"
4+
OSX.64="res://../../target/debug/libbuilder_export.dylib"
5+
Windows.64="res://../../target/debug/builder_export.dll"
6+
7+
[dependencies]
8+
9+
X11.64=[ ]
10+
OSX.64=[ ]
11+
12+
[general]
13+
14+
singleton=false
15+
load_once=true
16+
symbol_prefix="godot_"
17+
reloadable=true
File renamed without changes.

0 commit comments

Comments
 (0)