Skip to main content

Crate nylon_ring

Crate nylon_ring 

Source
Expand description

ABI-facing types and plugin-definition helpers for Nylon Ring.

Borrowed views such as NrStr and NrBytes do not carry Rust lifetimes across the ABI boundary. Their accessors are therefore unsafe: callers must guarantee that the referenced memory remains valid while the returned borrow is used.

Macros§

define_plugin

Structs§

NrAny
A type-erased value that can hold any data type. This struct is #[repr(C)] and ABI-stable.
NrBufferLease
A host-owned output buffer leased to the plugin.
NrBytes
A byte slice with a pointer and length. This struct is #[repr(C)] and ABI-stable.
NrHostExt
Host extension table for state management. This is an optional extension that does not modify the core ABI.
NrHostVTable
Host callback table.
NrIndexSlot
Index slot for hash table lookup. This struct is #[repr(C)] and ABI-stable.
NrKV
A key-value pair of strings.
NrKVAny
A key-value pair with any type as value. This struct is #[repr(C)] and ABI-stable.
NrMap
A map/dictionary type implemented as a vector of key-value pairs with hash index. This struct is #[repr(C)] and ABI-stable.
NrOwnedBytes
A callee-owned byte buffer handed across the ABI without a copy.
NrPluginInfo
Metadata exported by the plugin through nylon_ring_get_plugin.
NrPluginVTable
Plugin function table.
NrStatus
Status code passed across the Nylon Ring ABI.
NrStr
A UTF-8 string slice with a pointer and length. This struct is #[repr(C)] and ABI-stable.
NrTuple
A tuple of two elements. This struct is #[repr(C)] and ABI-stable.
NrVec
A vector with a pointer, length, and capacity. This struct is #[repr(C)] and ABI-stable.

Enums§

NrViewError
Error returned when an ABI string or byte view is malformed.

Constants§

ABI_VERSION
The single ABI version implemented by this crate, negotiated through the nylon_ring_get_plugin export. See docs/ABI_EVOLUTION.md.
NR_ENTRY_UNKNOWN
Returned by resolve_entry for a name the plugin does not export.