Skip to main content

Crate wolfram_expr

Crate wolfram_expr 

Source
Expand description

Efficient and ergonomic representation of Wolfram expressions in Rust.

Modules§

symbol
Representation of Wolfram Language symbols.

Macros§

expr
Build a Wolfram Language Expr with WL-like syntax.

Structs§

ArrayBuf
Generic dense N-dimensional buffer parameterized by an element-type tag.
BigInteger
Wolfram Language BigInteger — arbitrary-precision integer carried as its textual decimal representation (e.g. "99999999999999999999999").
BigReal
Wolfram Language BigReal — arbitrary-precision real carried as its WL textual representation, including any precision/accuracy markers (e.g. "3.1415926535897932384650.“`).
Expr
Wolfram Language expression.
Normal
Wolfram Language “normal” expression: f[...].
RuleEntry
Single association entry — key, value, and a flag indicating Rule (->, immediate) vs RuleDelayed (:>, held).
Symbol
Wolfram Language symbol.

Enums§

ExprKind
Wolfram Language expression variants.
ExpressionEnum
Top-level WXF expression token. #[repr(u8)] discriminants are the wire bytes.
HeaderEnum
WXF framing header bytes. No Display — header bytes overlap with some expression token bytes and are not used in error messages.
NumberDeprecated
Subset of ExprKind that covers number-type expression values.
NumericArrayEnum
WXF element-type tag for NumericArray. Discriminants are the WXF wire bytes.
PackedArrayEnum
WXF element-type tag for PackedArray. Same wire bytes as NumericArrayEnum but restricted to the packed-compatible variants (no unsigned integers).

Traits§

ArrayElement
Connects a Rust primitive to its element-type discriminant. Implemented once per (type, tag) pair: e.g. i32: ArrayElement<NumericArrayEnum> (with TAG = Integer32) and i32: ArrayElement<PackedArrayEnum> (with TAG = Integer32). Sealed — only the primitives listed above can satisfy the Sealed super-bound.
NumericArrayRead
Common read API implemented by both the owned crate::NumericArray / crate::PackedArray and the runtime-handle NumericArray<T> in wolfram-library-link.

Type Aliases§

Association
Wolfram Language <|...|> — an ordered list of RuleEntry.
ByteArray
Owned byte buffer — Wolfram Language ByteArray["..."].
Complex32
Single 32-bit complex number — pair of f32 (real, imaginary). Layout matches the WXF ComplexReal32 element wire format. No _Complex float typedef exists in WolframLibrary.h, so this type is wolfram-expr-only.
Complex64
Single 64-bit complex number — pair of f64 (real, imaginary).
F32
32-bit floating-point real number. Not NaN.
F64
64-bit floating-point real number. Not NaN.
NumericArray
Portable, owned NumericArrayWL value.
PackedArray
Owned PackedArrayWL value.