mirror of
https://github.com/Start9Labs/start-os.git
synced 2026-04-01 21:13:09 +00:00
Fix/making js work (#1456)
* Feat: js action wip: Getting async js feat: Have execute get action config feat: Read + Write chore: Add typing for globals chore: Change the default path, include error on missing function, and add json File Read Write chore: Change the default path, include error on missing function, and add json File Read Write wip: Fix the unit test wip: Fix the unit test feat: module loading * fix: Change the source + add input * fix: Change the source + add input wip: Fix missing js files during running fix: Change the source + add input wip: Fix missing js files during running * fix: other paths * feat: Build the arm js snapshot * fix: test with more * chore: Make the is_subset a result
This commit is contained in:
12
backend/src/bin/build-js-snapshots.rs
Normal file
12
backend/src/bin/build-js-snapshots.rs
Normal file
@@ -0,0 +1,12 @@
|
||||
fn main() {
|
||||
let mut runtime = deno_core::JsRuntime::new(deno_core::RuntimeOptions {
|
||||
will_snapshot: true,
|
||||
..Default::default()
|
||||
});
|
||||
let snapshot = runtime.snapshot();
|
||||
|
||||
let snapshot_slice: &[u8] = &*snapshot;
|
||||
println!("Snapshot size: {}", snapshot_slice.len());
|
||||
|
||||
std::fs::write("JS_SNAPSHOT.bin", snapshot_slice).unwrap();
|
||||
}
|
||||
Reference in New Issue
Block a user