mirror of
https://github.com/voltrevo/ValueScript.git
synced 2026-04-18 03:00:27 -04:00
Replace run with runLinked, allow modules that don't export functions
This commit is contained in:
@@ -97,4 +97,13 @@ impl VirtualMachine {
|
||||
|
||||
Err(exception)
|
||||
}
|
||||
|
||||
pub fn read_default_export(bytecode: &Rc<Vec<u8>>) -> Val {
|
||||
let mut bd = BytecodeDecoder {
|
||||
data: bytecode.clone(),
|
||||
pos: 0,
|
||||
};
|
||||
|
||||
bd.decode_val(&Vec::new())
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user