-
-
Notifications
You must be signed in to change notification settings - Fork 49
feat: Lua definition file generation, ladfile re-work #497
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
+3,468
−708
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Contributor
|
| Branch | feat/lua-declaration-files |
| Testbed | linux-gha |
Click to view all benchmark results
| Benchmark | Latency | Benchmark Result nanoseconds (ns) (Result Δ%) | Upper Boundary nanoseconds (ns) (Limit %) |
|---|---|---|---|
| component/access Lua | 📈 view plot 🚷 view threshold | 3,888.20 ns(-8.36%)Baseline: 4,242.83 ns | 4,787.65 ns (81.21%) |
| component/access Rhai | 📈 view plot 🚷 view threshold | 5,609.00 ns(-6.96%)Baseline: 6,028.89 ns | 6,583.01 ns (85.20%) |
| component/get Lua | 📈 view plot 🚷 view threshold | 2,558.80 ns(-3.46%)Baseline: 2,650.52 ns | 3,167.31 ns (80.79%) |
| component/get Rhai | 📈 view plot 🚷 view threshold | 4,295.50 ns(-5.02%)Baseline: 4,522.72 ns | 5,003.00 ns (85.86%) |
| conversions/Mut::from | 📈 view plot 🚷 view threshold | 92.54 ns(-3.68%)Baseline: 96.07 ns | 119.70 ns (77.31%) |
| conversions/Ref::from | 📈 view plot 🚷 view threshold | 100.75 ns(+6.73%)Baseline: 94.40 ns | 115.09 ns (87.54%) |
| conversions/ScriptValue::List | 📈 view plot 🚷 view threshold | 390.32 ns(+3.75%)Baseline: 376.21 ns | 413.13 ns (94.48%) |
| conversions/ScriptValue::Map | 📈 view plot 🚷 view threshold | 1,012.50 ns(-10.72%)Baseline: 1,134.04 ns | 1,301.73 ns (77.78%) |
| conversions/ScriptValue::Reference::from_into | 📈 view plot 🚷 view threshold | 28.43 ns(+3.38%)Baseline: 27.50 ns | 31.66 ns (89.79%) |
| conversions/Val::from_into | 📈 view plot 🚷 view threshold | 304.80 ns(-1.39%)Baseline: 309.09 ns | 369.54 ns (82.48%) |
| function/call 4 args Lua | 📈 view plot 🚷 view threshold | 1,898.00 ns(-4.13%)Baseline: 1,979.71 ns | 2,275.23 ns (83.42%) |
| function/call 4 args Rhai | 📈 view plot 🚷 view threshold | 1,339.60 ns(-11.21%)Baseline: 1,508.76 ns | 1,705.71 ns (78.54%) |
| function/call Lua | 📈 view plot 🚷 view threshold | 382.96 ns(+23.52%)Baseline: 310.04 ns | 520.67 ns (73.55%) |
| function/call Rhai | 📈 view plot 🚷 view threshold | 475.95 ns(+4.75%)Baseline: 454.37 ns | 544.00 ns (87.49%) |
| loading/empty Lua | 📈 view plot 🚷 view threshold | 1,536,300.00 ns(+64.14%)Baseline: 935,987.80 ns | 1,908,611.20 ns (80.49%) |
| loading/empty Rhai | 📈 view plot 🚷 view threshold | 2,004,400.00 ns(+69.74%)Baseline: 1,180,833.00 ns | 2,283,058.30 ns (87.79%) |
| math/vec mat ops Lua | 📈 view plot 🚷 view threshold | 7,094.50 ns(-11.63%)Baseline: 8,028.62 ns | 9,429.97 ns (75.23%) |
| math/vec mat ops Rhai | 📈 view plot 🚷 view threshold | 6,621.20 ns(-8.09%)Baseline: 7,204.03 ns | 8,202.65 ns (80.72%) |
| query/10 entities Lua | 📈 view plot 🚷 view threshold | 21,151.00 ns(-6.35%)Baseline: 22,584.30 ns | 26,651.93 ns (79.36%) |
| query/10 entities Rhai | 📈 view plot 🚷 view threshold | 19,207.00 ns(-10.61%)Baseline: 21,485.60 ns | 24,267.22 ns (79.15%) |
| query/100 entities Lua | 📈 view plot 🚷 view threshold | 41,695.00 ns(-7.10%)Baseline: 44,883.80 ns | 50,043.13 ns (83.32%) |
| query/100 entities Rhai | 📈 view plot 🚷 view threshold | 32,212.00 ns(-9.22%)Baseline: 35,484.10 ns | 40,108.06 ns (80.31%) |
| query/1000 entities Lua | 📈 view plot 🚷 view threshold | 247,350.00 ns(-15.55%)Baseline: 292,911.00 ns | 348,493.17 ns (70.98%) |
| query/1000 entities Rhai | 📈 view plot 🚷 view threshold | 162,180.00 ns(-9.28%)Baseline: 178,776.00 ns | 205,115.91 ns (79.07%) |
| reflection/10 Lua | 📈 view plot 🚷 view threshold | 5,544.20 ns(-11.41%)Baseline: 6,258.47 ns | 7,052.01 ns (78.62%) |
| reflection/10 Rhai | 📈 view plot 🚷 view threshold | 14,969.00 ns(-6.16%)Baseline: 15,951.20 ns | 16,950.93 ns (88.31%) |
| reflection/100 Lua | 📈 view plot 🚷 view threshold | 47,407.00 ns(-10.43%)Baseline: 52,924.80 ns | 59,377.62 ns (79.84%) |
| reflection/100 Rhai | 📈 view plot 🚷 view threshold | 719,580.00 ns(-9.08%)Baseline: 791,449.00 ns | 863,228.94 ns (83.36%) |
| resource/access Lua | 📈 view plot 🚷 view threshold | 3,602.30 ns(-6.21%)Baseline: 3,840.86 ns | 4,327.78 ns (83.24%) |
| resource/access Rhai | 📈 view plot 🚷 view threshold | 4,957.50 ns(-9.75%)Baseline: 5,493.22 ns | 6,110.71 ns (81.13%) |
| resource/get Lua | 📈 view plot 🚷 view threshold | 2,105.00 ns(-7.10%)Baseline: 2,265.86 ns | 2,789.75 ns (75.45%) |
| resource/get Rhai | 📈 view plot 🚷 view threshold | 3,751.50 ns(-6.74%)Baseline: 4,022.67 ns | 4,480.20 ns (83.74%) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
First of all few re-structuring changes in ladfiles, and a bit of refactoring to make this possible:
bevy_mod_scripting_bindings_domaincrate, which contains definitions that can be shared with the ladfile crate without bringing in bevy cratesScriptOperatorNamesReflectionPrimitiveKindTypedThroughlike structures, similarly to globals and function arguments, meaning the concept of a "wrapper" type , i.e.OptionorVecdissapears from standalone lad type definitions. Only "pure" types make it, the structure is parsed into ladfile enums.Finally
lua_language_server_lad_backendis estabilished, and brings in a ladfile processor which generates lua language server files!Migration Guide
If you were relying on ladfiles or implementing
TypedThroughmanually, the interfaces will have changed. Some types have moved between crates.Less types will appear in ladfiles