Skip to main content

Module spell

Module spell 

Source
Expand description

Per-language spellings of ABI types, names, and values, called from the Askama templates.

Every function takes the borrowed nativeview-abi descriptors directly. super::layout and [super::validate] reject every type spelling a template cannot express before rendering starts, so the /* unsupported */ fallback below is unreachable (and would fail the host compile if it were not).

Modules§

c
dart
swift
ts

Functions§

bare
Constant name without the NV_ namespace (NV_ABI_MAGIC -> ABI_MAGIC).
camel
lowerCamel of a snake / SCREAMING identifier (NV_ABI_MAGIC -> nvAbiMagic). A leading _ is dropped: Dart would make the name library-private.
enum_prefix
Constant prefix of one runtime ABI enum’s values: its name without the NvRuntime / Nv namespace, SCREAMING (NvRuntimeStatus -> STATUS), so each enum owns its own prefix.
hi_hex
High 32 bits of a 64-bit constant as 0x.........
int
Enum discriminant / constant: hex from 0x1000 up, decimal below.
java_int
Java int literal: hex above i32::MAX, where a decimal literal would not compile.
java_width
Java int constants for a layout value: one constant when every data model agrees, else _64 / _32 (or one constant when those agree) plus _I386 where i386 differs from ILP32.
lo_hex
Low 32 bits of a 64-bit constant as 0x.........
one_line
Single-line comment text: newlines folded so a doc can never end the comment early.
pascal
UpperCamel of a snake / dotted identifier (nv.text_input -> NvTextInput).
record_prefix
NvNodeRow -> NODE_ROW (Java / TS constant prefix of a record).
screaming
SCREAMING_SNAKE of a Rust identifier (NvValueTag -> NV_VALUE_TAG, hit_test -> HIT_TEST).
snake
snake_case of a Rust identifier (Surface -> surface).
uint
Unsigned constant spelled as declared (hex = true -> 0x...).
uint64
64-bit unsigned constant (hex = true -> 16-digit 0x...).