Back to JetBrains

Building AI applications in Rust

JetBrainsAugust 28, 20261h 46m
Topics56
Introduction to the Rust and AI Series0:10Guest Introduction: Stefan Cornfki0:30Background in Rust2:30Background in AI and Computational Linguistics5:03Early AI Ecosystem8:32Video Setup and Bevy Background10:30Why Rust is Good for AI Development15:00Borrow Checker and Productivity19:30Favorite Rust Features22:03Introduction to Rig23:03Becoming Rig Maintainer25:32Rat Code Demo Application27:00Async Usage in Rig29:00Completions API and Agents30:31Tools in Rig32:00Agent Tool Integration34:03Tool Parameters and JSON Schema34:31Tool Context System35:32Basic Tool Implementation36:30Minimal Coding Agent Design37:02Rig Hook System37:32Streaming API Implementation38:30Max Turns Configuration39:32Rust Traits and Type System42:02Abstraction Philosophy44:32Multi-Agent Architecture46:00Database Integration and RAG47:35RAG Applications50:00Provider Endpoint Traits51:30Testing Framework53:02Rig Candle Integration56:03Production Usage58:32Rig Advantages1:00:32Local Model Support1:02:02Rust Limitations for AI1:03:03AI-Assisted Development1:05:00AI Impact on Code Quality1:07:01AI as a Learning and Development Accelerator1:09:00Context Switching with Multiple Agents1:09:31Daily Workflow and Setup1:10:32Code Review Process1:12:02Satisfaction and Enjoyment of Programming1:14:04Understanding AI-Generated Code1:17:32Importance of Deep Technical Knowledge1:20:00Reasons for Anti-AI Sentiment1:21:32Recommendations for Trying AI Tools1:26:30Cost and Dependency Concerns1:27:33Future Tooling Evolution1:30:00Short-term Excitement: Bevy Integration1:32:33Rust's Growing Role in AI Development1:34:32Bevy's AI Policy Change1:36:32Open Source AI Challenges1:38:32Avoiding Over-Engineering from AI Reviews1:41:00Managing AI-Generated Changes in Pull Requests1:42:16Session Conclusion and Resources1:43:31Acknowledgments and Final Remarks1:45:02
In a Nutshell

Rust is the best language for AI development because its compiler, borrow checker, and static analysis provide clear guidance that benefits both humans and AI-generated code. Rig is a Rust library that abstracts LLM provider differences, enabling unified AI application development with support for agents, tools, RAG, and local models via Candle integration. AI coding tools have transformed development workflows, allowing developers to manage multiple projects simultaneously while maintaining code quality through rigorous review processes, though the Rust community faces ongoing challenges with AI-generated contributions and open source maintenance.

AI-Generated Notes

These notes were generated by AI and may contain inaccuracies.

Orhun, Rust developer advocate at JetBrains and lead maintainer of Ratatui, introduces a four-part series on Rust and AI collaboration with the Rust Foundation. The series explores multiple angles including using Rust to build AI-powered applications and using AI to build software in Rust. Multiple voices from the Rust community will examine both opportunities and challenges.

Stefan Cornfki, known online as Gold, Silver, Copper, joins as the lead maintainer of Rig, a Rust library for interacting with LLMs that supports major providers, AI agents, and various database integrations. He has been an open source developer for approximately 10 years.

Stefan initially heard about Rust at version 1.0 in 2015 but found it too new to adopt. He began programming in Rust full-time around 2023, motivated by his desire to consolidate C, Python, and JavaScript into a single language. He notes that Rust has evolved significantly since its early days, with the borrow checker becoming much more powerful and the compiler handling lifetime annotations automatically.

Stefan's background is in computational linguistics and natural language processing. He has been familiar with text generation techniques for over a decade, with early interests in text games like Zork from the 1970s-1980s written in Lisp. He began using machine learning around 2021 with the Spacy library for syntax tree generation, which impressed him with its accuracy compared to handrolled parsers. He was familiar with LLMs as early as 2019, including GPT-2 models and AI Dungeon, an early LLM-powered text game.

Sign in to read the full notes

Get access to AI-generated notes, topic timestamps, and more.