daedalus-macros

Crates.iodaedalus-macros
lib.rsdaedalus-macros
version0.1.1
created_at2026-01-23 03:52:51.319548+00
updated_at2026-01-23 03:52:51.319548+00
descriptionProc macros for Daedalus nodes and GPU binding helpers.
homepagehttps://github.com/Prometheus-Dynamics/Daedalus
repositoryhttps://github.com/Prometheus-Dynamics/Daedalus
max_upload_size
id2063353
size259,633
Mathias (SoZ0)

documentation

https://docs.rs/daedalus-macros

README

daedalus-macros

Procedural macros that generate node descriptors/handlers and GPU bindings with minimal boilerplate.

Macros

  • #[node]: annotate a function to generate a node descriptor, handler, and registration glue (IDs, ports, compute affinity, state).
  • #[derive(GpuBindings)]: derive WGSL binding packs for GPU shaders with binding inference and workgroup hints.
  • #[derive(GpuStateful)]: mark POD structs for persistent GPU state buffers.

Shader binding derive (high level)

  • #[gpu(spec(src = "...", entry = "...", workgroup_size = N))] on the binding struct points to WGSL.
  • Field attributes: #[gpu(binding = N)], texture2d(format = "...", write)], uniform, storage(read|read_write|write), sampler(...), state.
  • Inference: WGSL bindings/workgroup sizes inferred when not explicitly provided; compile-time validation against WGSL.

Node macro (high level)

  • Attributes for id, inputs/outputs, compute affinity, shaders(...), state(...), capabilities, and plugin glue.
  • Generates descriptor + handler registry entries; integrates with registry/planner/runtime.

Testing

  • Trybuild UI tests under crates/nodes/tests/ui exercise diagnostics and macro outputs.
Commit count: 8

cargo fmt