mirror of
https://github.com/Start9Labs/start-os.git
synced 2026-03-31 20:43:41 +00:00
chore: Make the commit do by checksum. chore: Remove the logging at the start chore: use the defaults of the original. chore: Convert the error into just the source. chore: Remove some of the unwraps
15 lines
385 B
Rust
15 lines
385 B
Rust
use deno_core::{JsRuntime, RuntimeOptions};
|
|
|
|
fn main() {
|
|
let mut runtime = JsRuntime::new(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();
|
|
}
|