summaryrefslogtreecommitdiff
path: root/runtime/ops/bootstrap.rs
diff options
context:
space:
mode:
Diffstat (limited to 'runtime/ops/bootstrap.rs')
-rw-r--r--runtime/ops/bootstrap.rs13
1 files changed, 12 insertions, 1 deletions
diff --git a/runtime/ops/bootstrap.rs b/runtime/ops/bootstrap.rs
index 7de532a9f..cbb87db88 100644
--- a/runtime/ops/bootstrap.rs
+++ b/runtime/ops/bootstrap.rs
@@ -30,7 +30,7 @@ deno_core::extension!(
},
);
-#[derive(Serialize, Default)]
+#[derive(Serialize)]
#[serde(rename_all = "camelCase")]
pub struct SnapshotOptions {
pub deno_version: String,
@@ -39,6 +39,17 @@ pub struct SnapshotOptions {
pub target: String,
}
+impl Default for SnapshotOptions {
+ fn default() -> Self {
+ Self {
+ deno_version: "dev".to_owned(),
+ ts_version: "n/a".to_owned(),
+ v8_version: deno_core::v8_version(),
+ target: std::env::consts::ARCH.to_owned(),
+ }
+ }
+}
+
// Note: Called at snapshot time, op perf is not a concern.
#[op2]
#[serde]