Defines a Deno extension. The first parameter is the name of the extension symbol namespace to create. This is the symbol you
will use to refer to the extension.
Helps embed JS files in an extension. Returns a vector of
ExtensionFileSource, that represent the filename and source code. All
specified files are rewritten into “ext:<extension_name>/<file_name>”.
Declares a block of Deno #[op]s. The first parameter determines the name of the
op declaration block, and is usually deno_ops. This block generates a function that
returns a Vec<OpDecl>.
BufMutView is a wrapper around an underlying contiguous chunk of writable
bytes. It can be created from a JsBuffer or a Vec<u8> and implements
DerefMut<[u8]> and AsMut<[u8]>.
BufView is a wrapper around an underlying contiguous chunk of bytes. It can
be created from a JsBuffer, bytes::Bytes, or Vec and implements
Deref<[u8]> and AsRef<[u8]>.
A strongly-typed external pointer. As this is a shared pointer, it only provides immutable references to
the underlying data. To allow for interior mutation, use an interior-mutable container such as [RefCell].
Module names and code can be sourced from strings or bytes that are either owned or borrowed. This enumeration allows us
to perform a minimal amount of cloning and format-shifting of the underlying data.
An RcRef encapsulates a reference counted pointer, just like a regular
std::rc::Rc. However, unlike a regular Rc, it can be remapped so that
it dereferences to any value that’s reachable through the reference-counted
pointer. This is achieved through the associated method, RcRef::map(),
similar to how std::cell::Ref::map() works. Example:
A module loader that you can pre-load a number of modules into and resolve from. Useful for testing and
embedding situations where the filesystem and snapshot systems are not usable or a good fit.
The actual source code returned from the loader. Most embedders should
try to return bytes and let deno_core interpret if the module should be
converted to a string or not.
Represents an underlying handle for a platform. On unix, everything is an fd. On Windows, everything
is a Windows handle except for sockets (which are SOCKETs).
Resources are Rust objects that are attached to a deno_core::JsRuntime.
They are identified in JS by a numeric ID (the resource ID, or rid).
Resources can be created in ops. Resources can also be retrieved in ops by
their rid. Resources are not thread-safe - they can only be accessed from
the thread that the JsRuntime lives on.
Takes a string representing either an absolute URL or a file path,
as it may be passed to deno as a command line argument.
The string is interpreted as a URL if it starts with a valid URI scheme,
e.g. ‘http:’ or ‘file:’ or ‘git+ssh:’. If not, it’s interpreted as a
file path; if it is a relative path it’s resolved relative to passed
current_dir.
Pass the command line arguments to v8.
The first element of args (which usually corresponds to the binary name) is
ignored.
Returns a vector of command line arguments that V8 did not understand.
A ResourceId is an integer value referencing a resource. It could be
considered to be the Deno equivalent of a file descriptor in POSIX like
operating systems. Elsewhere in the code base it is commonly abbreviated
to rid.