diff options
author | haturau <135221985+haturatu@users.noreply.github.com> | 2024-11-20 01:20:47 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-11-20 01:20:47 +0900 |
commit | 85719a67e59c7aa45bead26e4942d7df8b1b42d4 (patch) | |
tree | face0aecaac53e93ce2f23b53c48859bcf1a36ec /runtime/lib.rs | |
parent | 67697bc2e4a62a9670699fd18ad0dd8efc5bd955 (diff) | |
parent | 186b52731c6bb326c4d32905c5e732d082e83465 (diff) |
Merge branch 'denoland:main' into main
Diffstat (limited to 'runtime/lib.rs')
-rw-r--r-- | runtime/lib.rs | 29 |
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::*; |