diff options
author | Ryan Dahl <ry@tinyclouds.org> | 2020-09-10 09:57:45 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-09-10 09:57:45 -0400 |
commit | 7c2e7c660804afca823d60e6496aa853f75db16c (patch) | |
tree | b7746b181c1564c6b1abd2e906662f9e6b008417 /core/lib.rs | |
parent | 6f70e6e72ba2d5c1de7495adac37c1e4f4e86b24 (diff) |
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<RefCell<OpState>>`
* sync ops take `&mut OpState`
* removes `OpRegistry`, `OpRouter` traits
* `get_error_class_fn` moved to OpState
* ResourceTable moved to OpState
Diffstat (limited to 'core/lib.rs')
-rw-r--r-- | core/lib.rs | 8 |
1 files changed, 4 insertions, 4 deletions
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; |