Millwright — experimenting with an end-to-end machine learning framework in Rust [P]

Reddit r/MachineLearning Tools

Summary

Millwright is an open-source end-to-end machine learning framework in Rust that aims to unify ML workflows with a common abstraction layer, covering stages from data ingestion to monitoring while interoperating with Python and ONNX ecosystems.

I've been working on an open-source project called Millwright, an attempt to explore what an end-to-end machine learning workflow could look like in Rust. https://millwright-rs.dev/ This started while I was learning and building ML tooling in Rust. I kept finding capable individual libraries, but also gaps between them. Training a model was rarely the problem. Building the workflow around it — preprocessing, model selection, evaluation, explainability, deployment and monitoring — often meant integrating several unrelated crates and data representations. I initially started implementing some of those missing pieces as smaller independent crates. Eventually I realized I was more interested in the integration problem itself. That became Millwright. The current idea is to cover the classical ML lifecycle: ingest → explore → preprocess → select → fit → assess → explain → export → serve → monitor without trying to reimplement every ML algorithm. Instead, Millwright provides a common abstraction layer over existing Rust libraries and uses adapters for different ML backends. One architectural decision I'm experimenting with is having the framework own a small 2D data boundary (Frame) rather than exposing a particular backend's ndarray/dataframe representation throughout the API. That allows models and components backed by different libraries to participate in the same pipeline, at the cost of conversions at backend boundaries. The project currently includes work around: preprocessing and composable pipelines cross-validation and hyperparameter optimization multiple ML backends ensembles regression diagnostics SHAP-based explainability ONNX export model serving and registry drift monitoring time-series workflows incremental learning AutoML There are also Python bindings. I'm not building this on the assumption that Rust should replace Python for ML. Python's ecosystem is enormously more mature, and there would be little value in simply recreating scikit-learn in another language. The question I find more interesting is: Can Rust provide a useful common execution layer across training, inference and production ML while still interoperating with the existing Python/ONNX ecosystem? I'd rather have the architecture challenged before too many decisions become difficult to change. I'd particularly appreciate thoughts from people working on ML systems: Where do you think Rust could genuinely add value to the classical ML lifecycle? And conversely, which parts of this architecture do you think should remain separate rather than being unified behind one framework? I'm also interested in real workflows that would be useful tests. If there's something straightforward in sklearn that you think would expose weaknesses in this approach, I'd be interested in trying to reproduce it. Project / documentation: https://millwright-rs.dev/ Source: https://github.com/mi7plus/millwright
Original Article

Similar Articles

Building ML framework with Rust and Category Theory

Hacker News Top

This article announces a working draft book 'Category Theory for Tiny ML in Rust' and a public workshop introducing a tiny ML pipeline using Rust and category theory, aimed at making machine learning structure explicit through typed transformations.

Training a Language Model End-to-End in Rust: An Experience Report

arXiv cs.CL

This paper reports on training a language model end-to-end in Rust, detailing failures in Rust ML frameworks like Candle and Burn, and proposing verification methods, with the conclusion that Rust is currently better suited for model serving than training.

New

Reddit r/artificial

The article describes a personal project called Human Engineered Intelligence, a non-AI system built in Rust that processes language locally without training, featuring a custom architecture with authorities and cubes for knowledge representation.

Learnings from 100K lines of Rust with AI (2025)

Hacker News Top

A developer shares learnings from building a 100K-line Rust-based multi-Paxos consensus engine using AI coding agents, achieving dramatic productivity gains and performance improvements.