summaryrefslogtreecommitdiff
path: root/core/plugin_api.rs
diff options
context:
space:
mode:
authorElias Sjögreen <eliassjogreen1@gmail.com>2021-05-07 15:45:07 +0200
committerGitHub <noreply@github.com>2021-05-07 09:45:07 -0400
commit4ed1428c3401c9e6dc4d737bd7c9a50840054696 (patch)
tree62888871bee247f35d0f663b784ab072becfc164 /core/plugin_api.rs
parentc709f5df363887647915f7dd67e1c3bb8df6c526 (diff)
fix: align plugin api with Extension (#10427)
Diffstat (limited to 'core/plugin_api.rs')
-rw-r--r--core/plugin_api.rs22
1 files changed, 0 insertions, 22 deletions
diff --git a/core/plugin_api.rs b/core/plugin_api.rs
deleted file mode 100644
index 9f37df6f3..000000000
--- a/core/plugin_api.rs
+++ /dev/null
@@ -1,22 +0,0 @@
-// Copyright 2018-2021 the Deno authors. All rights reserved. MIT license.
-
-// This file defines the public interface for dynamically loaded plugins.
-
-// The plugin needs to do all interaction with the CLI crate through trait
-// objects and function pointers. This ensures that no concrete internal methods
-// (such as register_op and the closures created by it) can end up in the plugin
-// shared library itself, which would cause segfaults when the plugin is
-// unloaded and all functions in the plugin library are unmapped from memory.
-
-pub use crate::Op;
-pub use crate::OpId;
-pub use crate::OpResult;
-pub use crate::ZeroCopyBuf;
-
-pub type InitFn = fn(&mut dyn Interface);
-
-pub type DispatchOpFn = fn(&mut dyn Interface, Option<ZeroCopyBuf>) -> Op;
-
-pub trait Interface {
- fn register_op(&mut self, name: &str, dispatcher: DispatchOpFn) -> OpId;
-}