nsi_trait/lib.rs
1//! Core traits and types for the Nodal Scene Interface -- ɴsɪ.
2//!
3//! This crate provides the fundamental abstractions for ɴsɪ without any FFI
4//! dependencies. It defines:
5//!
6//! - [`Nsi`] -- the core trait that rendering contexts implement (`self` _is_ the context)
7//! - [`ParamValue`] -- trait implemented by Rust values that can be expressed
8//! as a single ɴsɪ `NSIParam_t` at the FFI boundary
9//! - [`Attribute<T>`](attribute::Attribute) and its alias [`Parameter<T>`](attribute::Parameter)
10//! -- typed compile-time names
11//! - [`Type`] -- NSI data type discriminant (`#[repr(i32)]`, C-compatible)
12//! - [`FfiParam`] -- C-compatible parameter struct (`#[repr(C)]`)
13//! - [`Flags`] -- Parameter flags (PerFace, PerVertex, etc.)
14//! - [`Name`] -- Feature-gated string type (`ustr::Ustr` or `String`)
15//! - [`Action`] -- Render control actions
16//! - [`NodeType`] -- Enum of all standard node types
17//! - Node type constants ([`ROOT`], [`MESH`], etc.)
18//! - [`Attribute<T>`](attribute::Attribute) -- Typed attribute names with
19//! per-name compile-time data-shape verification, plus standard attribute
20//! constants ([`P`](attribute::P), [`FOV`](attribute::FOV), etc.)
21//!
22//! # Crate Organization
23//!
24//! This is a pure Rust crate with no FFI. For FFI wrapper functionality,
25//! see the `nsi-ffi-wrap` crate.
26
27pub mod attribute;
28pub mod node;
29mod nsi_trait;
30
31pub use attribute::*;
32pub use node::*;
33pub use nsi_trait::*;