Andy Weidenbaum
1bb9236f7b
use Cow for d-r-y (Static...)
2021-06-15 07:28:46 +10:00
Andy Weidenbaum
10391c419a
add FunctionLoader and StaticFunctionSearcher
...
an alternative to boxing closures
2021-05-12 21:07:22 +10:00
Andy Weidenbaum
76425c0aeb
add StaticClosureSearcher
...
because evidently one does not merely accept `&'static str` OR `String`
2021-03-29 12:50:13 +11:00
Andy Weidenbaum
9d6faef3d3
ClosureSearcher.modules HashMap<String, ...>
2021-03-29 12:40:32 +11:00
Andy Weidenbaum
406c84dabf
clean up ClosureSearcher api with hrtb
...
see
- https://stackoverflow.com/questions/35592750/how-does-for-syntax-differ-from-a-regular-lifetime-bound/35595491#35595491
- https://doc.rust-lang.org/nomicon/hrtb.html
2021-03-24 07:43:52 +11:00
Andy Weidenbaum
801a04802a
implement ClosureSearcher
...
expose `UserData` created from Rust
manipulate the `rlua::Context` in Rust and return string to load as chunk
primarily intended to enable constructing Lua modules in Rust
- particularly Lua modules involving `UserData`
2021-03-23 14:43:56 +11:00
Andy Weidenbaum
cf3a90faca
implement PathSearcher
...
to facilitate module reloading
2021-02-26 20:59:46 +11:00
Andy Weidenbaum
4aa2f52dd7
index StaticSearcher &'static str by &'static str
...
credit
- https://stackoverflow.com/questions/65549983/trait-borrowstring-is-not-implemented-for-str/65550108#65550108
2021-02-15 11:33:45 +11:00
Andy Weidenbaum
f159a7cc27
implement add_static_searcher
...
to facilitate compile-time includes
2021-02-13 17:15:35 +11:00
Andy Weidenbaum
38c15af4dc
make initial implementation
...
credit
- https://github.com/AlphaModder/include-lua
2021-02-04 12:16:07 +11:00