summaryrefslogtreecommitdiff
path: root/runtime/lib.rs
diff options
context:
space:
mode:
Diffstat (limited to 'runtime/lib.rs')
-rw-r--r--runtime/lib.rs29
1 files changed, 24 insertions, 5 deletions
diff --git a/runtime/lib.rs b/runtime/lib.rs
index f0b1129ce..a6e60ced1 100644
--- a/runtime/lib.rs
+++ b/runtime/lib.rs
@@ -35,6 +35,7 @@ pub mod js;
pub mod ops;
pub mod permissions;
pub mod snapshot;
+pub mod sys_info;
pub mod tokio_util;
pub mod web_worker;
pub mod worker;
@@ -99,18 +100,30 @@ pub static UNSTABLE_GRANULAR_FLAGS: &[UnstableGranularFlag] = &[
show_in_help: true,
id: 7,
},
+ UnstableGranularFlag {
+ name: "node-globals",
+ help_text: "Expose Node globals everywhere",
+ show_in_help: true,
+ id: 8,
+ },
+ UnstableGranularFlag {
+ name: "otel",
+ help_text: "Enable unstable OpenTelemetry features",
+ show_in_help: false,
+ id: 9,
+ },
// TODO(bartlomieju): consider removing it
UnstableGranularFlag {
name: ops::process::UNSTABLE_FEATURE_NAME,
help_text: "Enable unstable process APIs",
show_in_help: false,
- id: 8,
+ id: 10,
},
UnstableGranularFlag {
name: "temporal",
help_text: "Enable unstable Temporal API",
show_in_help: true,
- id: 9,
+ id: 11,
},
UnstableGranularFlag {
name: "unsafe-proto",
@@ -118,22 +131,28 @@ pub static UNSTABLE_GRANULAR_FLAGS: &[UnstableGranularFlag] = &[
show_in_help: true,
// This number is used directly in the JS code. Search
// for "unstableIds" to see where it's used.
- id: 10,
+ id: 12,
},
UnstableGranularFlag {
name: deno_webgpu::UNSTABLE_FEATURE_NAME,
help_text: "Enable unstable `WebGPU` APIs",
show_in_help: true,
- id: 11,
+ id: 13,
},
UnstableGranularFlag {
name: ops::worker_host::UNSTABLE_FEATURE_NAME,
help_text: "Enable unstable Web Worker APIs",
show_in_help: true,
- id: 12,
+ id: 14,
},
];
+pub fn exit(code: i32) -> ! {
+ crate::ops::otel::flush();
+ #[allow(clippy::disallowed_methods)]
+ std::process::exit(code);
+}
+
#[cfg(test)]
mod test {
use super::*;