Initial work on wasm scripting backend

This commit is contained in:
2022-07-18 10:16:47 +02:00
parent 8eb1159d64
commit 7682704945
21 changed files with 651 additions and 31 deletions

View File

@@ -26,6 +26,11 @@ pub trait DataLibrary<'a, T: 'a> {
self.map().get::<StringKey>(key)
}
/// Gets a value from the library.
fn get_by_hash(&'a self, key: u32) -> Option<&'a T> {
self.map().get::<u32>(&key)
}
/// Gets a mutable value from the library.
fn get_mut(&mut self, key: &StringKey) -> Option<&mut T> {
self.get_modify().get_mut(key)