@@ -4,7 +4,7 @@ version = "0.1.1"
4
4
authors = [
" Maksymilian Mozolewski <[email protected] >" ]
5
5
edition = " 2021"
6
6
license = " MIT"
7
- description = " Bevy plugin for enabling scripting "
7
+ description = " Multi language scripting in Bevy "
8
8
repository = " https://github.com/makspll/bevy_mod_scripting"
9
9
homepage = " https://github.com/makspll/bevy_mod_scripting"
10
10
keywords = [" bevy" , " gamedev" , " scripting" , " lua" ]
@@ -16,58 +16,77 @@ include= ["readme.md","/src","/examples","/assets","LICENSE"]
16
16
name = " bevy_mod_scripting"
17
17
path = " src/lib.rs"
18
18
19
- [package .metadata .docs .rs ]
20
- features = [" lua54" ," teal" ," unsafe_lua_modules" ]
21
-
22
- [package .metadata .release ]
23
- enable-features =[" lua54" ]
19
+ [package .metadata ."docs .rs" ]
20
+ features = [" lua" ," rhai" ," lua_script_api" ," rhai_script_api" ," teal" ]
24
21
25
22
[features ]
23
+ # # core
24
+ doc_always = [" bevy_mod_scripting_core/doc_always" ]
25
+
26
+ # # lua
27
+ lua = [" bevy_mod_scripting_lua" ]
28
+ # one of these must be selected
29
+ lua51 = [" bevy_mod_scripting_lua/lua51" , " lua" ]
30
+ lua52 = [" bevy_mod_scripting_lua/lua52" , " lua" ]
31
+ lua53 = [" bevy_mod_scripting_lua/lua53" , " lua" ]
32
+ lua54 = [" bevy_mod_scripting_lua/lua54" , " lua" ]
33
+ luajit = [" bevy_mod_scripting_lua/luajit" , " lua" ]
34
+ luajit52 = [" bevy_mod_scripting_lua/luajit52" , " lua" ]
35
+
36
+ # optional
37
+ lua_script_api =[" bevy_script_api/lua" ]
38
+ unsafe_lua_modules =[" bevy_mod_scripting_lua/unsafe_lua_modules" ]
39
+ teal = [" bevy_mod_scripting_lua/teal" ]
40
+ mlua_serialize = [" bevy_mod_scripting_lua/mlua_serialize" ]
41
+ mlua_macros = [" bevy_mod_scripting_lua/mlua_macros" ]
42
+
43
+ # # rhai
44
+ rhai = [" bevy_mod_scripting_rhai" ]
45
+ rhai_script_api =[" bevy_script_api/rhai" ]
26
46
27
- # if enabled enables documentation updating in optimized builds
28
- doc_always = []
47
+ [dependencies ]
48
+ bevy_mod_scripting_core = { path = " bevy_mod_scripting_core" , version = " 0.1.1" }
49
+ bevy_mod_scripting_lua = { path = " languages/bevy_mod_scripting_lua" , version = " 0.1.1" , optional = true }
50
+ bevy_mod_scripting_rhai = { path = " languages/bevy_mod_scripting_rhai" , version = " 0.1.1" , optional = true }
51
+ bevy_script_api = { path = " bevy_script_api" , version = " 0.1.1" , optional = true }
29
52
30
- # enables loading possibly unsafe lua modules by lua scripts
31
- unsafe_lua_modules = []
53
+ [dev-dependencies ]
54
+ bevy = { version = " 0.8.0" }
55
+ rand = " 0.8.5"
32
56
33
- # enable teal utilities
34
- teal = []
35
57
58
+ # bevy_console = { git = "https://github.com/OnlyGraphs/bevy-console" }
59
+ # bevy_asset_loader = {git = "https://github.com/NiklasEi/bevy_asset_loader", features = ["dynamic_assets"]}
60
+ # bevy_script_api= {path="./bevy_script_api", version="0.1.1", features=["lua","rhai"]}
61
+ # bevy_mod_scripting_rhai = {path="languages/bevy_mod_scripting_rhai", version="0.1.1"}
62
+ # bevy_mod_scripting_lua = {path="languages/bevy_mod_scripting_lua", version="0.1.1", features=["lua54"]}
63
+ # bevy_mod_scripting_lua_derive = {path="languages/bevy_mod_scripting_lua_derive", version="0.1.1"}
36
64
37
- lua51 = [" tealr/mlua_lua51" ]
38
- lua52 = [" tealr/mlua_lua52" ]
39
- lua53 = [" tealr/mlua_lua53" ]
40
- lua54 = [" tealr/mlua_lua54" ]
41
- luajit = [" tealr/mlua_luajit" ]
42
- luajit52 = [" tealr/mlua_luajit52" ]
65
+ # bevy = { version = "0.8.0"}
66
+ # serde = "1.0.137"
67
+ # criterion = "0.3"
43
68
44
- mlua_serialize = [" tealr/mlua_serialize" ]
45
- mlua_macros = [" tealr/mlua_macros" ]
46
69
47
- [dependencies ]
48
- bevy = { version = " 0.8.0" , default-features = false , features =[" bevy_asset" ," bevy_gltf" ," bevy_animation" ," bevy_core_pipeline" ," bevy_ui" ," bevy_pbr" ," bevy_render" ," bevy_text" ," bevy_sprite" ," filesystem_watcher" ]}
49
- tealr = { version = " 0.9.0-alpha1" , features =[" mlua_vendored" ," mlua_send" ]}
50
- rhai = { version = " 1.7.0" , features = [" sync" ] }
51
- anyhow = " 1.0.57"
52
- once_cell = " 1.10.0"
53
- bevy_event_priority = {path = " bevy_event_priority" , version = " 0.1.1" }
54
- bevy_mod_scripting_derive = {path = " bevy_mod_scripting_derive" , version = " 0.1.1" }
55
- thiserror = " 1.0.31"
56
- lazy_static = " 1.4.0"
57
- paste = " 1.0.7"
58
- parking_lot = " 0.12.1"
59
- serde_json = " 1.0.81"
60
- num-traits = " 0.2.15"
61
- serde = { version = " 1" , features = [" derive" ] }
62
- smallvec = " 1.9.0"
70
+ [workspace ]
71
+ resolver = " 2"
72
+ members = [
73
+ " bevy_mod_scripting_core" ,
74
+ " bevy_event_priority" ,
75
+ " bevy_mod_scripting_derive" ,
76
+ " bevy_api_gen" ,
77
+ " bevy_script_api" ,
78
+ " languages/bevy_mod_scripting_lua" ,
79
+ " languages/bevy_mod_scripting_lua_derive" ,
80
+ " languages/bevy_mod_scripting_rhai" ,
81
+ # "languages/rhai/derive",
82
+ " bevy_mod_scripting_common"
83
+ ]
63
84
64
- [dev-dependencies ]
65
- # bevy_console = { git = "https://github.com/OnlyGraphs/bevy-console" }
66
- # bevy_asset_loader = {git = "https://github.com/NiklasEi/bevy_asset_loader", features = ["dynamic_assets"]}
67
- bevy = { version = " 0.8.0" }
68
- rand = " 0.8.5"
69
- serde = " 1.0.137"
70
- criterion = " 0.3"
85
+ [profile .dev ]
86
+ opt-level = 1
87
+
88
+ [profile .dev .package ."*" ]
89
+ opt-level = 3
71
90
72
91
73
92
# needs bevy 0.8 support from console
@@ -84,45 +103,38 @@ criterion = "0.3"
84
103
[[example ]]
85
104
name = " complex_game_loop_lua"
86
105
path = " examples/lua/complex_game_loop.rs"
87
- required-features = [" lua54" ]
106
+ required-features = [" lua54" ]
88
107
89
108
[[example ]]
90
109
name = " game_of_life_lua"
91
110
path = " examples/lua/game_of_life.rs"
92
- required-features = [" lua54" ," teal" ]
111
+ required-features = [" lua54" ," teal" , " lua_script_api " ]
93
112
94
113
[[example ]]
95
114
name = " event_recipients_lua"
96
115
path = " examples/lua/event_recipients.rs"
116
+ required-features =[" lua54" ]
97
117
98
118
[[example ]]
99
119
name = " documentation_gen_lua"
100
120
path = " examples/lua/documentation_gen.rs"
101
- required-features = [" lua54" ]
121
+ required-features = [" lua54" , " teal " , " lua_script_api " ]
102
122
103
123
104
124
[[example ]]
105
125
name = " bevy_api_lua"
106
126
path = " examples/lua/bevy_api.rs"
107
- required-features = [" lua54" ]
127
+ required-features =[" lua54" ," lua_script_api" ]
128
+
129
+ [[example ]]
130
+ name = " bevy_api_rhai"
131
+ path = " examples/rhai/bevy_api.rs"
132
+ required-features =[" rhai" ]
108
133
109
134
[[example ]]
110
135
name = " wrappers"
111
136
path = " examples/wrappers.rs"
112
- required-features = [" lua54" ]
137
+ required-features = [" lua54" , " lua_script_api " ]
113
138
114
139
115
- [workspace ]
116
- resolver = " 2"
117
- members = [
118
- " bevy_event_priority" ,
119
- " bevy_mod_scripting_derive" ,
120
- " bevy_api_gen"
121
- ]
122
-
123
- [profile .dev ]
124
- opt-level = 1
125
-
126
- [profile .dev .package ."*" ]
127
- opt-level = 3
128
140
0 commit comments