Skip to main content

Crate nsi_sys

Crate nsi_sys 

Source
Expand description

Auto-generated Rust bindings for Illumination Research’s Nodal Scene Interface – ɴsɪ.

You should not need to use this crate directly except for two reasons. You are likely either:

  • a masochist who wants to use the C-API directly from Rust.

  • Not happy with my high level Rust binding (see below) – consider opening an issue here instead.

  • writing a renderer that exposes an ɴsɪ C-API.

§High Level Bindings

There are high level Rust bindings for this API in the ɴsɪ crate.

§Differences From The C API

All enums have been rustified – they were mapped to actual Rust enums.

Postfixes were stripped on enum and struct type names. E.g.:

NSIParam_tNSIParam

Prefixes and postfixes were stripped on enum variants. E.g.:

NSIType_t::NSITypeInvalidNSIType::Invalid

Rationale: make code using the bindings a bit less convoluted resp. easier to read.

Finally, NSIParamFlags is a bitflags struct that wraps the NSIParam* flags from the C-API for ergonomics.

§Compile- vs. Runtime

The crate builds as-is, with default features.

However, at runtime this crate requires a library/renderer that implements the ɴsɪ C-API to link against. Currently the only renderer that does is 3Delight.

§Features

  • omit_functions – Omit generating bindings for the API’s functions. This is for the case where you want to expose your own C-API hooks from your renderer.

Structs§

NSIParam
NSIParamFlags
NSIProcedural

Enums§

NSIErrorLevel
NSIStoppingStatus
NSIType

Constants§

NSI_ALL_ATTRIBUTES
NSI_ALL_NODES
NSI_SCENE_GLOBAL
NSI_SCENE_ROOT
NSI_VERSION

Functions§

NSIBegin
NSIConnect
NSICreate
NSIDelete
NSIDeleteAttribute
NSIDisconnect
NSIEnd
NSIEvaluate
NSIRenderControl
NSISetAttribute
NSISetAttributeAtTime

Type Aliases§

NSIContext
NSIErrorHandler
NSIHandle
NSIProceduralExecute
NSIProceduralLoad
NSIProceduralUnload
NSIRenderStopped
NSIReport