This is a crate for easing the building of deno plugins by providing a simple
macro which automatically converts the first element in the ZeroCopy
to a
serde_json::Value
and the Result<_, _>
to a json object.
```rust use deno_core::error::AnyError;
use denocore::pluginapi::Interface; use denocore::pluginapi::Op; use denocore::pluginapi::ZeroCopyBuf;
use denocore::serdejson::Value; use denocore::serdejson::json;
use denojsonop::json_op;
pub fn denoplugininit(interface: &mut dyn Interface) { interface.registerop("test", optest); }
fn optest(interface: &mut dyn Interface, val: Value, zerocopy: &mut [ZeroCopyBuf]) -> Result
Pull request, issues and feedback are very welcome. Code style is formatted with
deno fmt
and commit messages are done following Conventional Commits spec.
Copyright 2020-present, the denosaurs team. All rights reserved. MIT license.