// readme

rustnn

A Rust implementation of the W3C WebNN API with pluggable execution backends.


[WARNING] EXPERIMENTAL - DO NOT USE IN PRODUCTION

rustnn is a development release (0.6.0). APIs change without notice.


What is rustnn?

  • The WebNN API in Rust. MLContext, MLGraphBuilder, MLGraph, MLTensor and dispatch mirror the W3C WebNN JavaScript API. Every operation of the specification is available on the builder; rustnn-specific additions carry a rustnn_ prefix.
  • Backends selected at context creation. ONNX Runtime, NVIDIA TensorRT-RTX, Apple CoreML, LiteRT and Huawei CANN, chosen from the WebNN accelerated and power-preference hints or forced with a backend hint.
  • Graph interchange. Loads .webnn text and JSON graphs from webnn-graph and onnx2webnn, saves graphs with .safetensors weights, exports ONNX and CoreML models and, with their features, TensorRT engines, TFLite and CANN models.
  • Conformance. The upstream WebNN Web Platform Tests run in-repo against the backends on every pull request; the…