naga 0.1.0
naga: ^0.1.0 copied to clipboard
WGSL validation and shader compilation for Dart.
naga #
WGSL validation for Dart using naga, the shader compiler behind wgpu. Validation results match exactly what wgpu accepts or rejects.
Usage #
import 'package:naga/naga.dart';
final errors = Naga.validate(wgslSource);
if (errors.isEmpty) {
print('Shader is valid');
} else {
for (final e in errors) {
print('${e.message} at offset ${e.offset}');
}
}
Uses Dart Native Assets — the Rust library builds automatically, no manual setup.