diff options
author | Divy Srivastava <dj.srivastava23@gmail.com> | 2022-03-20 16:08:35 +0530 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-03-20 16:08:35 +0530 |
commit | 5e82bcf0e422d657591328a0d6645b16ea45959c (patch) | |
tree | e0dd7b2bd9217431764c1d2bde61e0a4954dce01 | |
parent | 7c2722201e0b89bc6d80ab27413573add87d2cff (diff) |
chore(core): update deno_core README (#14042)
Co-authored-by: Andreu Botella <andreu@andreubotella.com>
-rw-r--r-- | core/README.md | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/core/README.md b/core/README.md index dc159240d..08ac072cf 100644 --- a/core/README.md +++ b/core/README.md @@ -16,10 +16,10 @@ keeps track of all pending tasks (async ops, dynamic module loads). It is user's responsibility to drive that loop by using `JsRuntime::run_event_loop` method - it must be executed in the context of Rust's future executor (eg. tokio, smol). -In order to bind Rust functions into JavaScript, use the `Deno.core.opSync()` -and `Deno.core.opAsync()` functions to trigger the "op_fn" callback in -`JsRuntime::register_op` on Rust side. A conventional way to handle "op_fn" -callbacks is to use the `op_sync` and `op_async` functions. +Rust functions can be registered in JavaScript using `deno_core::Extension`. Use +the `Deno.core.opSync()` and `Deno.core.opAsync()` functions to trigger the op +function callback. A conventional way to write ops is using the +[`deno_ops`](https://github.com/denoland/deno/blob/main/ops) crate. Documentation for this crate is thin at the moment. Please see [hello_world.rs](https://github.com/denoland/deno/blob/main/core/examples/hello_world.rs) |