From 7c2e7c660804afca823d60e6496aa853f75db16c Mon Sep 17 00:00:00 2001 From: Ryan Dahl Date: Thu, 10 Sep 2020 09:57:45 -0400 Subject: Use gotham-like state for ops (#7385) Provides a concrete state type that can be dynamically added. This is necessary for op crates. * renames BasicState to OpState * async ops take `Rc>` * sync ops take `&mut OpState` * removes `OpRegistry`, `OpRouter` traits * `get_error_class_fn` moved to OpState * ResourceTable moved to OpState --- core/lib.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'core/lib.rs') diff --git a/core/lib.rs b/core/lib.rs index b27419ff5..450b7378a 100644 --- a/core/lib.rs +++ b/core/lib.rs @@ -8,10 +8,10 @@ extern crate lazy_static; #[macro_use] extern crate log; -mod basic_state; mod bindings; mod errors; mod flags; +mod gotham_state; mod module_specifier; mod modules; mod normalize_path; @@ -24,7 +24,6 @@ mod zero_copy_buf; pub use rusty_v8 as v8; -pub use crate::basic_state::BasicState; pub use crate::errors::AnyError; pub use crate::errors::ErrBox; pub use crate::errors::JsError; @@ -38,12 +37,13 @@ pub use crate::modules::ModuleSource; pub use crate::modules::ModuleSourceFuture; pub use crate::modules::RecursiveModuleLoad; pub use crate::normalize_path::normalize_path; +pub use crate::ops::json_op_async; +pub use crate::ops::json_op_sync; pub use crate::ops::Op; pub use crate::ops::OpAsyncFuture; pub use crate::ops::OpFn; pub use crate::ops::OpId; -pub use crate::ops::OpRegistry; -pub use crate::ops::OpRouter; +pub use crate::ops::OpState; pub use crate::ops::OpTable; pub use crate::resources::ResourceTable; pub use crate::runtime::js_check; -- cgit v1.2.3