diff options
author | Divy Srivastava <dj.srivastava23@gmail.com> | 2022-10-05 07:06:44 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-10-05 19:36:44 +0530 |
commit | 0b016a7fb8639ce49603c8c339539174b191a4b1 (patch) | |
tree | c511060d701db60ede0214b7280e89c5749bbe62 /runtime/build.rs | |
parent | 3a3a8484069c9c6955fcb83ea761f9f74638175a (diff) |
feat(npm): implement Node API (#13633)
This PR implements the NAPI for loading native modules into Deno.
Co-authored-by: Bartek IwaĆczuk <biwanczuk@gmail.com>
Co-authored-by: DjDeveloper <43033058+DjDeveloperr@users.noreply.github.com>
Co-authored-by: Ryan Dahl <ry@tinyclouds.org>
Diffstat (limited to 'runtime/build.rs')
-rw-r--r-- | runtime/build.rs | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/runtime/build.rs b/runtime/build.rs index 55a89fb8b..23411fc77 100644 --- a/runtime/build.rs +++ b/runtime/build.rs @@ -120,6 +120,15 @@ mod not_docs { } } + impl deno_napi::NapiPermissions for Permissions { + fn check( + &mut self, + _path: Option<&Path>, + ) -> Result<(), deno_core::error::AnyError> { + unreachable!("snapshotting!") + } + } + impl deno_flash::FlashPermissions for Permissions { fn check_net<T: AsRef<str>>( &mut self, @@ -191,6 +200,7 @@ mod not_docs { None, false, // No --unstable. None, ), + deno_napi::init::<Permissions>(false), deno_http::init(), deno_flash::init::<Permissions>(false), // No --unstable ]; |