Missing `init_ops_and_esm` function for extensions in rust
Hi there, I'm just getting started with Deno and trying to embed it in rust. I'm using
deno_core
0.344.0
and deno_console
0.204.0
. The docs for deno_console
(and most docs about extensions) reference calling init_opts_and_esm
like deno_console::deno_console::init_ops_and_esm()
but this function doesn't seem to exist. I can't seem to find where it is defined, it's not in the deno
repo or any cargo docs. I find the same on an extension that I create with extension
as well.
There is an init
function . However, when I try to use that I get a panic like:
That happens before I can run any js code to import the module.
Any idea what I'm doing wrong here?3 Replies
Looks like it was renamed, see https://github.com/denoland/deno_core/pull/1117/files
Oh, that makes some sense then. But I"m still not clear on how to resolve the error I get when I use
init
instead.
It says the module needs to be imported.. but it panics before I can run code that imports itI'm afraid I can't help further as I've never embedded parts of Deno in another Rust app