diff options
| author | Ryan Dahl <ry@tinyclouds.org> | 2020-04-20 10:27:15 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-04-20 10:27:15 -0400 |
| commit | 6e5f3453f806d6007b8f724837b5dd7d9eb17be9 (patch) | |
| tree | 12d683562ae59856c81aca683541b0239290c41a /core | |
| parent | 437e35ca52227337588148a6896040d3fc3f2d54 (diff) | |
Remove core/plugin.rs (#4824)
This simplifies the plugin interface in order to deliver op crates with a similar API
Diffstat (limited to 'core')
| -rw-r--r-- | core/lib.rs | 2 | ||||
| -rw-r--r-- | core/plugins.rs | 24 |
2 files changed, 0 insertions, 26 deletions
diff --git a/core/lib.rs b/core/lib.rs index d1776fb69..661640910 100644 --- a/core/lib.rs +++ b/core/lib.rs @@ -17,7 +17,6 @@ mod js_errors; mod module_specifier; mod modules; mod ops; -mod plugins; mod resources; mod shared_queue; @@ -31,7 +30,6 @@ pub use crate::js_errors::*; pub use crate::module_specifier::*; pub use crate::modules::*; pub use crate::ops::*; -pub use crate::plugins::*; pub use crate::resources::*; pub fn v8_version() -> &'static str { diff --git a/core/plugins.rs b/core/plugins.rs deleted file mode 100644 index a423790bc..000000000 --- a/core/plugins.rs +++ /dev/null @@ -1,24 +0,0 @@ -// TODO(ry) This plugin module is superfluous. Try to remove definitions for -// "init_fn!", "PluginInitFn", and "PluginInitContext". - -use crate::ops::OpDispatcher; - -pub type PluginInitFn = fn(context: &mut dyn PluginInitContext); - -pub trait PluginInitContext { - fn register_op( - &mut self, - name: &str, - op: Box<OpDispatcher>, // TODO(ry) rename to dispatcher, not op. - ); -} - -#[macro_export] -macro_rules! init_fn { - ($fn:path) => { - #[no_mangle] - pub fn deno_plugin_init(context: &mut dyn PluginInitContext) { - $fn(context) - } - }; -} |
