diff options
author | Nayeem Rahman <nayeemrmn99@gmail.com> | 2023-06-25 08:35:31 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-06-25 09:35:31 +0200 |
commit | 28a4f3d0f5383695b1d49ccdc8b0f799a715b2c2 (patch) | |
tree | cd75b05db0bbfdadf3e565ca120d1f5d9ca39942 /runtime/examples | |
parent | a181ceb0e3791c842db6e8e6f528cf9ce320642a (diff) |
Reland "refactor(core): cleanup feature flags for js source inclusion" (#19519)
Relands #19463. This time the `ExtensionFileSourceCode` enum is
preserved, so this effectively just splits feature
`include_js_for_snapshotting` into `exclude_js_sources` and
`runtime_js_sources`, adds a `force_include_js_sources` option on
`extension!()`, and unifies `ext::Init_ops_and_esm()` and
`ext::init_ops()` into `ext::init()`.
Diffstat (limited to 'runtime/examples')
-rw-r--r-- | runtime/examples/extension_with_esm/main.rs | 2 | ||||
-rw-r--r-- | runtime/examples/extension_with_ops/main.rs | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/runtime/examples/extension_with_esm/main.rs b/runtime/examples/extension_with_esm/main.rs index 6b21460a3..9f6dfca92 100644 --- a/runtime/examples/extension_with_esm/main.rs +++ b/runtime/examples/extension_with_esm/main.rs @@ -26,7 +26,7 @@ async fn main() -> Result<(), AnyError> { PermissionsContainer::allow_all(), WorkerOptions { module_loader: Rc::new(FsModuleLoader), - extensions: vec![hello_runtime::init_ops_and_esm()], + extensions: vec![hello_runtime::init_ext()], ..Default::default() }, ); diff --git a/runtime/examples/extension_with_ops/main.rs b/runtime/examples/extension_with_ops/main.rs index 1feb4ba27..ae9911210 100644 --- a/runtime/examples/extension_with_ops/main.rs +++ b/runtime/examples/extension_with_ops/main.rs @@ -28,7 +28,7 @@ async fn main() -> Result<(), AnyError> { PermissionsContainer::allow_all(), WorkerOptions { module_loader: Rc::new(FsModuleLoader), - extensions: vec![hello_runtime::init_ops()], + extensions: vec![hello_runtime::init_ext()], ..Default::default() }, ); |