Skip to main content

polydat_nodes/
lib.rs

1// Copyright 2024-2026 Jonathan Shook
2// SPDX-License-Identifier: Apache-2.0
3
4//! The Polydat node library: every function a program can call that
5//! the compiler does not synthesize itself. Each node is a
6//! `#[polydat_node]` function over the core's value model and
7//! registers into the registry at link time, so linking this crate is
8//! what makes its functions callable; a third-party node crate is
9//! built the same way. The numeric bodies the native lowerings share
10//! live in `polydat_core::numeric`, and the nodes here that have a
11//! lowering are thin wrappers over them.
12//!
13//! `polydat` re-exports every module here under `polydat::library`,
14//! beside the nodes the core keeps, at the paths they always had.
15
16#![cfg_attr(test, allow(clippy::approx_constant))]
17
18// The node macro emits `polydat::…` paths; here they resolve to the
19// core, as they do inside the core itself.
20extern crate polydat_core as polydat;
21
22pub mod arithmetic;
23pub mod bitwise;
24pub mod bytebuf;
25pub mod compare;
26pub mod datetime;
27pub mod digest;
28pub mod emit;
29pub mod encoding;
30pub mod hash;
31pub mod lerp;
32pub mod math;
33pub mod noise;
34pub mod param_helpers;
35pub mod partition;
36pub mod pcg;
37pub mod pick;
38pub mod probability;
39pub mod random;
40pub mod realer;
41pub mod regex;
42pub mod register;
43pub mod round_numbers;
44pub mod sampling;
45pub mod stability;
46pub mod streamer;
47pub mod string;
48pub mod vector_math;
49pub mod weighted;
50
51#[cfg(test)]
52mod core_tests;