← All AI Engineer talks

AI Engineer World's Fair 2025

Rust is the language of the AGI

Read the talk

Rust for AI coders and their human assistants

RustCoder turns Rust’s demanding compiler into feedback for code generation, combining retrieval, model-specific prompts, and repair tools that work through both IDEs and agent interfaces.

From a talk by Michael Yuan

Before you start: Basic familiarity with programming, command-line tools, and language-model tool calls is helpful; prior Rust experience is not required.

What changes when the programmer is a machine?

If an AI writes the code and a human assists it, what should a programming language optimize for? Ease of writing is no longer the only consideration. Michael Yuan opens with that reversal: Rust tools for AI coders first, their human assistants second.

His project, RustCoder, starts from a tension in Rust’s reputation. Around its tenth anniversary, Yuan describes Rust as having topped Stack Overflow’s most-loved-language results throughout its history. Yet admiration does not translate directly into wanting to use it. On the displayed 2024 Stack Overflow survey chart, Rust’s red admired marker is about 82%, while its blue desired marker sits below Python’s, though above Go’s. These measure different things: continued interest among existing users versus interest in using a language.

Chart with blue and red percentage markers for seven languages; Rust shows 28.7% and 82.2%.
Programming-language survey results from Stack Overflow 2024.

The obstacle is the learning curve. Rust’s type system and compiler reject classes of mistakes that a developer might otherwise discover later. That is useful, but it also means a beginner must understand more before getting a program through compilation. Yuan recalls encountering the same difficulty himself, followed by a point at which Rust made writing correct code feel easier. The initial cost and the eventual benefit come from the same enforcement.

0:000:13
Suggest correction

This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.

0:00 · section reference included

The compiler becomes a feedback channel

For a human trying to get something working quickly, Python or JavaScript can offer an attractive tradeoff: less friction now, with some debugging or maintenance deferred. Yuan connects this to Bret Taylor’s conversation on Latent Space, which contrasts human-oriented language ergonomics with the needs of machine-generated software. Rust offers execution efficiency, structural rigor, and strong compiler checks even when those properties make it harder to write initially.

The compiler gives a code generator a concrete signal about what to change next. Yuan describes the familiar Rust experience of spending substantial effort reaching a successful build, then finding fewer problems afterward. The important boundary is that compilation checks language constraints, not whether the application does what its user intended. A program can compile and still calculate the wrong answer. Within that boundary, compiler diagnostics provide a much tighter repair loop than asking a model whether its own answer looks plausible.

Yuan extends that feedback argument to reinforcement learning, invoking DeepSeek, AlphaGo, and AlphaZero as reference points. Compiler acceptance can serve as a reward signal: generate a candidate, evaluate it with an external checker, and use the result to improve the next candidate. This is his proposed advantage for Rust code generators, rather than a description of a RustCoder training run.

The language choice changes further if generated code becomes difficult for humans to read. Human readability is a major reason to choose Python or JavaScript; producing incomprehensible code in those languages gives up that advantage. Yuan’s alternative is to favor a language whose generated output is amenable to mechanical checking while remaining reasonably accessible to human maintainers.

3:413:57
Suggest correction

This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.

3:41 · section reference included

From a Rust learning corpus to a running program

RustCoder’s immediate goal is to teach AI systems to generate better Rust. Yuan describes support from two Linux Foundation internship grants, comparable in structure to Google Summer of Code, and the use of educational materials he attributes to the Rust Foundation. The intended users split into two groups: humans learning Rust or working in an IDE, and machines generating code on demand. For the latter, a model could execute a plan by producing a program rather than relying exclusively on existing API calls.

The initial retrieval pipeline begins with educational material. Interns derive several hundred tasks that Rust developers commonly encounter, create embeddings, and place them in a vector database. A programming question can then retrieve relevant material to support a Rust answer. The knowledge base supplies examples and context; the model still has to adapt them to the requested task.

The first demonstration asks Qwen Coder, running on a Gaia network node, to solve a number-base conversion problem from Cursor. The interaction proceeds in a deliberate order:

  1. Supply the programming question.
  2. Add examples pairing inputs with expected outputs.
  3. Explicitly request a Rust implementation.
  4. Send the prompt to the Gaia node.

The explicit language instruction prevents the assistant from defaulting to Python or JavaScript.

The response includes both code and an explanation of its data structures and functions. Yuan copies the generated program into the editor and runs cargo run, which compiles and executes it; the demonstration produces the expected result.

For a compact base-conversion example, consider converting decimal 42 into binary and hexadecimal. Repeated division produces digits from least significant to most significant, so the implementation reverses them before returning the result:

rust

fn to_base(mut value: u64, base: u32) -> Option<String> {
    if !(2..=36).contains(&base) {
        return None;
    }
    if value == 0 {
        return Some(String::from("0"));
    }

    let alphabet = b"0123456789abcdefghijklmnopqrstuvwxyz";
    let mut digits = Vec::new();
    while value > 0 {
        let remainder = (value % u64::from(base)) as usize;
        digits.push(char::from(alphabet[remainder]));
        value /= u64::from(base);
    }
    Some(digits.into_iter().rev().collect())
}

fn main() {
    assert_eq!(to_base(42, 2).as_deref(), Some("101010"));
    assert_eq!(to_base(42, 16).as_deref(), Some("2a"));
    assert_eq!(to_base(0, 10).as_deref(), Some("0"));
    assert_eq!(to_base(42, 1), None);
}

The assertions make the input/output contract concrete, just as the demonstration’s examples constrain the requested answer.

Yuan reports that over 1,000 developers used the project in a university-based Rust camp. He describes essentially all comparable exam questions as answerable in one shot, with explanations that help learners explore further. That broad statement should be read alongside the project team’s published case study: it documents selected first-attempt successes, including base conversion, but also reports difficulty with harder semifinal problems. The demonstration establishes a successful learning interaction, not an aggregate exam pass rate.

6:437:02
Suggest correction

This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.

6:43 · section reference included

Giving Cursor a compiler-and-repair tool

The next step moves beyond answering a prompt with a retrieved example. RustCoder exposes an MCP server that Cursor can use to generate projects and repair existing ones. In the demonstration, the server runs locally on port 3000 and exposes two tools.

ToolInputOperation
GenerateDescription and requirements stringsRetrieve a relevant template and adapt it into a Rust project
Compile and FixRust project filesCompile, use diagnostics to repair source, and recompile

Generate draws on stored algorithms and use cases. Compile and Fix instead receives the project in the IDE’s context and delegates compilation to the server’s own Rust compiler. Its coding model then uses the resulting errors to attempt a repair.

The repair loop is straightforward:

  1. Compile the received project.
  2. If compilation fails, give the diagnostics and source to the coding model.
  3. Apply a candidate repair and compile again.
  4. Return the resulting project when compilation succeeds, or stop when the configured attempt budget is exhausted.

Yuan explains the loop as repeating until it works. The current repository documents bounded attempts through max_attempts; its documented payload examples below describe the current interface, rather than a pinned version of the recording. Iteration provides opportunities to recover, not a promise of eventual success.

11:3611:50
Suggest correction

This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.

11:36 · section reference included

A broken Hello World makes the exchange visible

The repair demonstration uses a deliberately small project: a program intended to print Hello, world!, with missing closing syntax. Yuan places Cargo.toml and src/main.rs in Cursor’s context and asks it to compile the project and fix the compiler errors. Cursor selects Compile and Fix; Yuan authorizes the tool call, receives the syntax repair, and accepts the change. The program can then compile.

Cursor editor shows main.rs beside a completed compile_and_fix tool call, a red-and-green code diff, and an explanation of the syntax repair.
Cursor displays the corrected Hello World code and repair diff.

Inspecting the tool exchange reveals the important contract. The request contains filename-delimited sections: first Cargo.toml and its contents, then src/main.rs and its broken source. The response returns the entire corrected package, not merely an explanation or a patch. Cursor’s own model compares that returned source with the editor’s files and turns the difference into a proposed edit. The repair service returns a project; the IDE manages applying it.

14:3314:45
Suggest correction

This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.

14:33 · section reference included

Specialization lives in the whole repair stack

A missing delimiter is not a persuasive test of specialized Rust expertise. Yuan acknowledges that Cursor’s existing compiler integration and a model such as Claude could likely solve this example. His proposed advantage lies in packaging the compiler with a Rust-specific knowledge base, prompts, and a coding model. Error examples associate a diagnostic with code that triggers it and a corresponding repair. When the service cannot fix a problem, a successful alternative from Cursor or a human can supply another useful example.

In this setup, Gaia and LlamaEdge run Qwen Coder. Yuan expects this integrated specialization to outperform generic coding assistants on more complex Rust work, but the small syntax demonstration does not measure that comparison. The proposed improvement comes from making the components work together and expanding what the system can retrieve.

The model is configurable: a deployment can use a commercial or open-source coding model. Prompts must match the selected model’s format. Yuan uses Gemma 3 as an example: its native instruction-tuned conversation format places system-level instructions in the initial user message. Other models can accept instructions and code context through a system message. This is a formatting distinction, not an inability to follow system-level instructions.

The compiler-error knowledge base remains incomplete. Its useful unit is a concrete relationship—this source pattern produces this diagnostic, and this edit repairs it. Community contributions can extend those relationships so retrieval supplies relevant examples for increasingly complex errors. Yuan presents that growing coverage as a long-term goal, rather than demonstrating an automatic learning mechanism in the IDE session.

16:4316:54
Suggest correction

This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.

16:43 · section reference included

Runtime, retrieval, and the MCP boundary

Underneath the repair service, Yuan describes LlamaEdge as a runtime based on a Linux Foundation project. He positions it as broader than an LLM-only runner: alongside language models, the examples include YOLO, Whisper, text-to-speech models, and Stable Diffusion, across GPUs and NPUs. His analogy is to a general model-execution environment such as Python, rather than only to llama.cpp or Ollama.

Yuan describes the LlamaEdge runtime as tens of megabytes, compared with gigabytes for a PyTorch environment. The comparison concerns runtime footprint, not model weights, and does not specify matched versions or dependency boundaries.

The remaining layers divide responsibility:

  • Full-text retrieval: Elasticsearch and TiDB are named as search options.
  • Vector retrieval: Qdrant stores searchable embeddings, with a choice of embedding models.
  • Packaging: Gaia Network combines the inference and knowledge-base capabilities on LlamaEdge.
  • Tool exposure: An open MCP proxy presents the resulting service to MCP clients.

This separates model execution from retrieving Rust knowledge and from the interface through which an IDE or agent invokes the service.

19:5120:04
Suggest correction

This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.

19:51 · section reference included

Beyond the IDE: software consumed by models

So far, the visible beneficiary is a human: a learner receives an explanation, or a developer accepts a repair in Cursor. Yuan’s larger interest is the consumer on the other side of the tool interface. Web, desktop, and mobile interfaces are designed for human eyes and fingers; multitouch makes that physical assumption especially clear.

API-first software shifted the immediate consumer to another program or workflow engine. Stripe’s payment APIs and Twilio’s telecom services illustrate how a capability can be delivered without owning the application’s primary user interface. LLM tool use introduces another consumer: a model that can interpret a task and choose a service, rather than following only a predetermined workflow. RustCoder exposes compilation and model-assisted repair for that consumer.

Yuan’s proposed drone application makes the distinction concrete. An MCP server’s knowledge base would include the drone SDK’s Rust crate. A model would generate code describing where to fly and how to respond under specified conditions, send it through compilation and repair, and upload the resulting program to the drone. This is a long-term autonomous execution vision, not a demonstrated deployment. Compiler checks would constrain the generated program, but safe flight and correct mission behavior would still require validation beyond compilation.

21:1621:32
Suggest correction

This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.

21:16 · section reference included

Running RustCoder and exchanging projects

RustCoder belongs to LowCodeRust, a collection of Rust tools for computers. Its two interfaces serve different callers: APIs fit deterministic programs and workflow engines, while MCP lets language models discover and invoke tools. Both can participate in an autonomous-agent system.

The deployment path Yuan describes is to clone the repository, configure the coding model, and start the supplied Docker Compose stack on a machine with Docker Desktop:

sh

docker compose up

Compose starts the containers, connects to the specified model, and brings up the included vector database and service APIs.

Generation accepts a JSON object with description and requirements. For the Hello World project used earlier, a request body can be as small as:

json

{
  "description": "Create a Rust command-line application",
  "requirements": "Print Hello, world! and exit successfully"
}

The result contains the project files. A downstream caller must separate and save them; Cursor already performs that role when it recognizes filenames in the returned text. A workflow engine needs equivalent file-handling logic.

Repair takes the reverse path: combine the existing files into one text payload, send it for compilation and repair, and receive the whole project in the same format. Current documentation uses markers such as [filename: Cargo.toml] and [filename: src/main.rs]; the repair request carries the project in code, and the response provides it in combined_text.

For example, a complete corrected Hello World package can be represented as:

[filename: Cargo.toml]
[package]
name = "hello"
version = "0.1.0"
edition = "2021"

[filename: src/main.rs]
fn main() {
    println!("Hello, world!");
}

Preserving filenames lets the next component reconstruct the package after the compiler-and-model loop finishes.

Slide titled “APIs for workflow managers” with side-by-side documentation panels for generating a project and compiling and fixing errors, including request and response blocks.
API examples for project generation and compilation repair.

The same capabilities are available through MCP without Cursor. Yuan points to a command-line MCP client in the documentation and then to integration with agent frameworks. Once the server is connected to a framework, generation and repair become ordinary tool choices: the model decides when it needs new Rust code and when it should send an existing project for compilation and fixes.

24:5625:06
Suggest correction

This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.

24:56 · section reference included

The remaining work is concrete Rust knowledge

At the time of the talk, RustCoder is a work in progress, with its second Linux Foundation internship still underway and progress tracked on GitHub. Yuan’s contribution priorities follow directly from the architecture: enlarge the knowledge base, improve the system’s ability to repair Rust, and expose more functionality for other agents to use. His thesis that AI coders offer a path toward AGI ends with that practical task—make generation and compiler feedback useful enough that another machine can reliably build on them.

28:1328:23
Suggest correction

This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.

28:13 · section reference included

Resources

From the talk

Read the complete timestamped transcript
  1. 0:00

    Hello, welcome to my talk. So the topic of my talk is Rust is the Language of AGI, artificial general intelligence. I explain why. It's about Rust tools for AI coders and their human assistants.

  2. 0:13

    You read it right. The AI first, human second. That's, you know, um, I say I believe it's a lot of how things are evolving. So my name is Michael Yuan, and, uh, um, you can...

  3. 0:24

    So this link and this QR code goes my, goes to my GitHub page, where you can find my email and contact information, X account, and you know, things like that.

  4. 0:32

    And you can also see some of the open source projects that I'm involved in, including this project that I want to talk to you about called RustCoder. Anyway, this is a AI conference, so I think may, it may be prudent to get started with, uh, a little bit background about what is Rust.

  5. 0:50

    And Rust, as you know, is a programming language. It's hard to believe it's just celebrated its ten years anniversary, so it's took a long time to grow a programming language.

  6. 0:59

    And one of its distinctions is that people love it. You know, that's, uh, um... So

  7. 1:07

    since the Stack Overflow has its developer survey, so Rust is the most beloved programming language every single year in the past ten years. It's, it just celebrated its ten year anniversary, right?

  8. 1:18

    So s- pretty much since it was born, it was very beloved by the programming community. Uh, so this is this year's data.

  9. 1:27

    But you can also see some of the, I would say, troubles or the signs, you know, that's, uh... So you can see, let's let-- from the top, it's Python, JavaScript, SQL, HTML, TypeScript, Rust, and Go, right?

  10. 1:42

    And you can see the red, uh, the red bar is how people admire the language. People really admire and really love Rust. It has eighty-two percent. It's much higher than anyone else, than anything else that's in this list, right?

  11. 1:56

    You know, that's, uh... But what about the blue? The blue is actually desired, how much people want to actually use it, right? You know, so f- in that measurement, Python is really high and Rust is not really that high.

  12. 2:12

    But surprisingly it's higher than, than Go, right? You know, so, you know, that's brings to the issue. Rust is a language that people really love for many reasons, which I'm gonna get into why.

  13. 2:23

    But also people find it's diff, somewhat difficult or somewhat they are re- hesitant to use it themselves. Why? Because for humans, Rust has a very steep learning curve. Okay?

  14. 2:37

    So you know, so there's, uh, um, you can, you can just search for Rust learning curve on the internet. You can see a lot of examples. And people find it's difficult to learn because it has a very powerful compiler that forces you to do the right thing.

  15. 2:52

    You can do a lot of things that are not only wrong, you know, that's not only not optimal, but also very bug-prone in languages like C++ or in languages like Python or JavaScript that are not even a compiler, right?

  16. 3:05

    You know, so it's just a, um... So you can anything goes, right? No strong type system and all that. So Rust forces you to write from, write the correct and optimized code from the get go.

  17. 3:18

    And, uh, that is, a- apparently very difficult for beginners. And I have to say I went through the same learning curve when I started to learn Rust. The, the good news, of course, is once you mastered that, it's, uh, it become a lot easier to write correct code in Rust than any other language.

  18. 3:33

    But the initial, um, learning curve is hard to get over. So that's one of the big issues with Rust, right?

  19. 3:41

    However, that's the human-centric world. The human-centric world will want a language that easy to write. Maybe it has bugs, but then we can get the result quicker, right? You know, maybe it's hard to maintain, but you know, that's, uh, let's have something working first.

  20. 3:57

    So that's why Python and JavaScript are so popular. Rust is not that language. So what is Rust good for? So I, I, I think there's a very enlightening talk, um, you know, by, i- in the Latent Space podcast by Bret, um, Bret Taylor, you know, who's, uh, you know, um, the chairman of OpenAI and, you know, very

  21. 4:15

    famous guy. And, uh, so he basically said a human would prefer Python over Rust, um, because y- you know, it's easier. But Rust is better suited for machines, not only because it's more efficient, but because it's all more structurally oriented for the strong compiler checking, the strong type system and all that.

  22. 4:38

    It's just more rigorous. And, uh, because the compiler provide a very tight feedback loop. You know, one of the experiences that a lot of Rust developer have is that there's little debugging outs once the project compiles.

  23. 4:55

    You know, once your Rust project compiles, there's a high likelihood it's gonna run correctly. You know, [laughs] and it's, uh, uh, it, it would run as you intended. You know, that's, uh, um...

  24. 5:05

    So the same can't be said by man- many other languages, especially languages without compilers. But though because of this, because this property, the, the compiler of the Rust language provide a very good feedback loop for the AI.

  25. 5:19

    So it forces AI to gen-- It creates what we call a very good reward function, right? You know, so if you think about reinforcement learning, which is where popularized by, say, I mean, the large language model space.

  26. 5:31

    It's popularized by DeepSeek, you know, in a, in a general space. Popularized by, say, AlphaGo, AlphaZero, right?

  27. 5:37

    You provide, uh, you, um... For any ans- for any question or any request, you have a correct answer in the world of Rust is what the compiler accepts, right?

  28. 5:47

    It provide a very strong feedback to the, uh, to the large language model, so it can get really good at those things. So that's why we say, uh, a programming like, a programming language like Rust, maybe it's difficult for humans, but it's a per- really a perfect fit for AI code generators.

  29. 6:04

    So if we, if we see a future where most of the code is written by AI, I would think That's, you know, to have AI write human incomprehensible Python or JavaScript is not the way to go because those languages-- the benefit of those languages are human comprehensible, right?

  30. 6:20

    You know. If you are going to write code that is hard for humans but easy for AI, but you can eas-- you can fairly easily verify its correctness, then Rust would be the way to go, right?

  31. 6:30

    You know. So that's a background, you know. That's why we think, you know, in the, in the world of AI, in the world of generated code, Rust, a language like Rust is so important because it's friendlier to the AI and also reasonably friendly to the humans.

  32. 6:43

    So what do we want to do? So that's why we, uh, started a project called Rust Coder with a very specific goal of, um, making, uh, Rust more... Teaching Rust to AI and making AI generator b- generate better Rust code, right?

  33. 7:02

    So this project, by the way, it's sponsored by two, uh, internship grants from the Linux Foundation. You can think of this as, uh, you know, Google Summer of Code, that type of thing, but sp- paid for and sponsored by Linux Foundation.

  34. 7:13

    And they do use copyrighted materials from the, uh, educational materials from the Rust Foundation as well. So, um, the goal of this Rust Coder project really is for humans, make it easier, makes the AI assistant of learning Rust, make it easier to learn Rust, to write code with Rust, and to

  35. 7:33

    make Rust easier to work with in IDEs, for instance. But perhaps more importantly, as we'll see in a minute, for machines, make it possible to generate Rust code on the fly.

  36. 7:42

    For instance, uh, one thing that people do believe is that the path to AGI may come from code generators, right? You know. So if the large language model planned for something and it want to execute on it, it could call API, or it could generate code to perform this task for it, right?

  37. 7:58

    You know. So this-- So we-- Our goal is to make it easier for machine to generate correct Rust code. And to make it... Yeah, so, you know, you give it a specific task, it can generate code on the fly and make sure that the code, by working with the compiler, to make sure that the code is correct,

  38. 8:15

    you know, at least can correctly execute. Right? So that's the goal of the Rust Coder project. So first, I'll show a, a demo that is help humans learn Rust.

  39. 8:28

    And, uh, there's a link here that's, um, goes into the process. So the process really is that we take Rust education materials and we, um, ask our, um, um, software interns to generate, um, several hundreds of tasks that, um, you know, common Rust developer would do, and, uh, build that into a knowledge base by creating embeddings, put

  40. 8:49

    that into vector database and all that. And to build a system where you can ask a, a programming question or asking a programming task to the AI agent, and the AI agent would be able to give you, um, you know, a Rust answer, right?

  41. 9:04

    You know. So let's see a demo. In this test, the student needs to write a Rust program to convert numbers to different bases. This is a complex problem. Let's see if a Chairman Coder model running on Gaia network can pass this test.

  42. 9:24

    We are accessing this Gaia node from the Cursor IDE.

  43. 9:29

    In Cursor's AI assistant panel, we'll first give it the question.

  44. 9:34

    Since this is a complex question, we'll also give it some examples like this input, get this output.

  45. 9:42

    Finally, we'll, we'll tell it to implement it in Rust so that it wouldn't do it in Python or JavaScript.

  46. 9:50

    Now we send the question and everything to the Gaia node that runs the Chairman Coder model. It immediately start to give the answers as well as the code that implements its answer.

  47. 10:19

    After that, it even give the explanation of the code.

  48. 10:24

    It tell you how the, how it structures the, the data and, uh, the purpose of different functions in the code.

  49. 10:37

    Now I'll just copy the entire code and put that into the main IDE.

  50. 10:50

    After that, I can go ahead and run Cargo Run, which would compile and run the application, and it gives the right result.

  51. 11:02

    So now have, you have seen the demo. Here is, uh, um, this project is actually used by over a thousand developers that in a, in a, um, in a university-ba- based Rust camp.

  52. 11:14

    And one of the questions that you have just saw are the exam questions. And, uh, so all, essentially all the exam questions are like that, and the Rust Coder would be able to do it in one shot.

  53. 11:24

    And will be, would be able to explain its answers to the, um, to the learner and, uh, help them explore more. Right. So this is the first demo.

  54. 11:36

    Now let's look at the second demo because that's more wipe coding. You know, that's, uh, you have an instruction, generate some Rust code that is, you know, it's has similar examples in the database, in the vector database.

  55. 11:50

    Now we want to do something that is more advanced, that is to help humans code in Rust in IDE, right? So for that, we made a MCP server in the, in the Rust Coder.

  56. 12:02

    So in the same, same approach, we can integrate MCP server into Cursor IDE, right? So we provide several MCP tools that allow Cursor to generate a new project and compile and fix a pr- uh, existing project.

  57. 12:18

    So here's the demo So here y-you can see I have Cursor opened up and, uh, in the Cursor MCP servers, I have added a local Rust coder MCP server.

  58. 12:31

    And, uh, you can go to our documentation to find out how to do that. And you can see once connected, it's available at localhost port three thousand. So it's, uh, it's running entirely on my local machine.

  59. 12:42

    And you can see it creates two tools. One, one tool is called Generate. So

  60. 12:49

    the, the Generate MCP tool, um, allows you to give it a description and, and then a requirement both in stream format. And, uh, it would generate the whole, um,

  61. 13:01

    um, a, a whole Rust project for you. Um, because it has a vector database that has many common, you know, um, algorithms and Rust use cases and, you know, things like that.

  62. 13:13

    So it can find a template and then, um, based on your description, modify the template and generate for you. But I want to show you today really is that...

  63. 13:21

    Um, so let me refresh this. So let's get back. So what I, what I really want to show you here today is the Compile and Fix. So Compile and Fix is a MCP tool that allows you to take, um, files, um, Rust project files, um, in the context, and then ask the large language model to send that--

  64. 13:43

    to send those files to the MCP server so that the MCP server compiles it using its own Rust compiler to compile it. Uh, if it encounter any error, it's gonna use the error to use its own large language model, coding large language model, to figure out what the error is and, uh, then attempt to fix the source

  65. 14:01

    code. And after the fi-- after it try to fix it, it's gonna run the compiler again. It's gonna repeat until it gets, uh, um, gets the right results. So this tool, I believe, is pretty useful, you know, when used with, um, IDEs because it allows, uh, because it allows you to just give your Rust project to the,

  66. 14:23

    to the MCP and have it automatically fix the bugs, right? So here, uh, what are we gonna do is that I'm gonna, um, go to... Because I have a Rust project open.

  67. 14:33

    And you can see it's a very simple project. It's, uh, just to print "Hello, world!" And, uh, it's obviously wrong because there's no closing there, right? You know, so the syntax is wrong.

  68. 14:45

    So what I'm gonna do is that I can in a, in agent chat, I'm gonna tell it to compile the Rust project file in the context. So two files in the context, the Cargo.toml and Rust main.rs, and fix all the compiler bugs.

  69. 15:01

    Go. So Cursor sees my re-request and sees the files in the context, and it knows the best way to do that is to call the MCP tool that I've just-- that's connected, called Compile and Fix.

  70. 15:14

    So I'm gonna say run the tool. Oh, so it's really fast. So it c-comes back and says the syntax error is this. So just, uh, you know, adding those so you can-- we can just accept this and then now fixed.

  71. 15:30

    It can-- the, the code can compile now. But before we go, let's go into the tool and see what's being--

  72. 15:39

    what's a request and response. So the request really is... So it sends two files here. One is file name Cargo.toml and the content of this file being underneath it.

  73. 15:50

    And then s-start a new section called file src/main.rs. And then the file that's in here, that's the broken main.rs that wouldn't pass the compiler. So we send that to the tool, and the re-response from the tool is still the entire-- the, the source code of the entire package.

  74. 16:11

    So it has a file name toml dot-- Cargo.toml, and then the

  75. 16:16

    source main.rs. But you can see it fixed this already. So this-- by having this results coming back from the MCP tool, the building, uh, large language model inside the Cursor would be able to figure out what's the difference and then tell you.

  76. 16:32

    And then it also intelligent enough to know that this is a hint. So it can just fix this and then it ask-- it goes back to the editor and ask to fix it.

  77. 16:43

    Now I know you must be asking, you know, that's... For a simple example like that, the building Rust compiler and building large language model like Claude, uh, inside Cursor can probably figure it out as well.

  78. 16:54

    A-after all, it's just missing a, you know, uh, missing something obvious, right? Um, but what I would like to note is that, uh, for tools like, um, the Rust coder, the MCP server, it's a fully integrated solution with its own knowledge base of all the, all the Rust compiler error messages and how to fix those error messages.

  79. 17:15

    And as you use it, the knowledge base also grows, right? Because sometimes it can't fix it, but Cursor would give a different, uh, answer, or you would give a different answer.

  80. 17:24

    So it would know-- it would learn as it goes how to fix this type of issues. And, uh, it's integrated with its own prompt, its knowledge base, and its own large language, uh, large language model.

  81. 17:36

    Uh, in this particular case, we use, uh, the Gaia network and LlamaEdge to run a, um, a chairman coder model, right? You know, so it's have all these things packaged together.

  82. 17:46

    So it's a whole package that's gets more intelligent about Rust development over time. So I believe it's gonna be a lot better than, say, using, um, the generic coding large language models that's available in Cursor, which is really designed for Python and JavaScript and such, but knows a little bit of Rust.

  83. 18:06

    So it can solve easy Rust problems, but probably not the big ones.

  84. 18:10

    All right. So now you have seen the demo. So l-let's recap how it works, right? So there's, uh, MCP tools that, um, two MCP tools. One generate a project and then compile and fix any errors, as you can see.

  85. 18:23

    And, uh, so under the hood, it's an integrated stack. Of several tools that work together that has been fine-tuned and to-- and programmed that they call each other and knows each other's behavior so that they all work together to complete those tasks.

  86. 18:40

    So we have coding large language models that you can use commercial. You can configure to use commercial ones or use open source ones. Um, in this partic-- um, you know, so in this particular case, we are using open source model.

  87. 18:50

    That's Chain Coder. It optimized for the prompt tailored to the model. So each model takes a different prompt. So for instance, the Gamma three model would not have a system prompt, so you have to put the system prompt in the, in the user message, right?

  88. 19:04

    For others, you can put the code in context into the system prompt. So there's different variations in what type of language that the model responds to, right? And then most importantly, a self-improving knowledge base of Rust compiler error messages.

  89. 19:18

    So Rust compiler has a lot of error messages, and we gave examples. If this error message is typically triggered, if the code looks like this, and this is how to fix it.

  90. 19:27

    So but we can't cover all of them. So one of the goal of this, uh, long-term goal of this project is for people to contribute this knowledge back into the knowledge base so that it can be more intelligent.

  91. 19:40

    It can search more relevant examples and allow it to fix even, uh, error more complex, you know, error messages, right? So the tech stack behind that are all open source.

  92. 19:51

    So we have a LlamaEdge project, which is, um, uh, based on Linux Foundation project that runs large language model and AI models everywhere. So, you know, so, uh, you may think this is, oh, maybe this is a LlamaCPU or Ollama, but no.

  93. 20:04

    It's, uh, it actually, it's more like Python. It runs a large variety of different models, just not, not just, uh, large language models, but things also like YOLO, Whisper, TTS, Stable Diffusion, and all that stuff.

  94. 20:18

    Runs all those models and runs across many different GPUs and MPUs. But other than... Uh, unlike Python, it is much, much smaller. So it's only measured in tens of megabytes, the runtime itself.

  95. 20:30

    Tens of megabytes instead of gigabytes for PyTorch, right? And, uh, um, then on top of that, we have integrated a knowledge base, as we have mentioned. It's m- it's a core part of the system, so it has, um, full-text search using Elasticsearch.

  96. 20:45

    It has u- and also full text search use TiDB, and also, um, uh, vector search use Qdrant. And it has also, um, various, um, vector embedding models that you can choose from.

  97. 20:56

    So that's all packaged into, uh, a product that build on LlamaEdge. It's called Gaia Network, which you can... I would also encourage you to check it out. And then we turn that into MCP server using the m- open MCP proxy, and this is its own open source project.

  98. 21:10

    And, uh, please go check it out if you have time.

  99. 21:16

    So now we have seen, you know, h- um, how do we use the Gaia and the R- Rust Coder project to help humans, right? To help them getting started with Rust programming, write code Rust program, and, uh, debug your Rust program.

  100. 21:32

    But I think even more poten-- even larger potential that's, um, you know, that's would happen in the near future is MCP is not really for humans, although we are using it for humans at this moment.

  101. 21:44

    It's really for machines. So we take a little step back through the memory lane. You know, who are the real user of computers, right? You know. So that's in the early days or maybe fifteen years ago, it was mostly humans.

  102. 22:00

    That's why we have the web UI, we have desktop, we have mobile UI and all that. It's all geared towards humans. The human with their eyes, with their fingers.

  103. 22:08

    You know, we can... The multi-touch is, you know, it's, it's the UI is designed for human fingers, right? You know, so the humans are the human computer interface. And then the API era comes.

  104. 22:19

    You know, the API first approach, meaning develop your applications as API first, not as, uh, u- human inter-interface first. Meaning at that time, the consumer would be a computer.

  105. 22:30

    You know, some other computer or some other workflow engine would consume your services, you know, as a API. There's, um, many big, uh, many very successful companies grow out of that era.

  106. 22:40

    So for instance, Stripe, right? It's a payment solution. It's pretty much only API, you know. That's, uh, um, you know, it's integrated into another application that actually has a UI, right?

  107. 22:51

    And, uh, uh, Tibco is another one, right? You know, sending, uh, you accessing the, the, the telecom infrastructure. The, the list go on. There are many, many applications like that.

  108. 23:00

    But since, um, large language model come out, I think tool use become one of the ways that, um, your software and your application can be consumed by its user.

  109. 23:11

    Now, the user is no longer a computer that is, uh, deterministic but fairly dumb. It can only follow certain rules. It'd be the large language model that behave like humans, but it's really computers.

  110. 23:22

    So, you know, that's where we have the MCPs, the tool calls, right? You know, so we provide, we provide our services. In this, in this particular case, we provide the Rust compiler service.

  111. 23:34

    We also provide the large language model-based bug fixing service as a tool for other language, large la- large language model to use. So you can envision a future where we build a system that is not an IDE, but say, to control a drone, you know.

  112. 23:50

    That's, uh... So the rest of the code generated is to, um, is to direct where the drone gonna fly and how would they behave in certain circumstances. It would just generate that code using the SDK that is specified, that is, um, the Rust crate that's included in the knowledge base of the MCP server.

  113. 24:10

    And, uh, then, you know, automatically compile and debug until it works, and it's get uploaded to the drone. And then the drone fly out and do whatever, do whatever the AI wants it to do, right?

  114. 24:23

    Entirely without human intervention, you know, but with reasonable guarantees of the correctness of the code that have been generated, right? So that's- Our long term vision for the Rust Coder project.

  115. 24:35

    I know it's a big, big vision, but, you know, that's, uh, um, you know, that's what-- where we want to go in, in the world of AGI, right? So

  116. 24:45

    at the last section of this talk, so I would just, uh,

  117. 24:50

    give you a little bit, um, you know, um, because we talked about how to use the Rust Coder, what is it used for, and how do you use it?

  118. 24:56

    But we haven't really talked about what's inside it, you know, how do you get started and, you know, things like that. So the Rust Coder is part of the program we call Low-Code Rust.

  119. 25:06

    And here's the URL and the, the, um, the QR code. Um, please do go visit it. So it's a set Rust tools for computers, right? You know, so Rust Coder is one of those.

  120. 25:17

    And, uh, so it provide, like I said, provide APIs and MCP services. So the API allow it to work with workflow engines or deterministic software programs. And MCP allows it to work with large language models, which I believe in the, in the world of, um, you know, autonomous agents, both would play a very important role.

  121. 25:36

    So it provide services in both interfaces, right? So to install and run it is really easy. So it has a GitHub repository. You can just clone it, and then it has a, um, you know, Docker Compose script.

  122. 25:49

    So anywhere where you have Docker Desktop installed, you can just run Docker Compose up, and, uh, it would spin up all the containers, right, and connect to the appropriate large language model, uh, coding large language model that you specify.

  123. 26:02

    It has, uh, a vector database embedded in it. So once you install and run, you'll be able to access the APIs for workflow managers. Here are examples of two APIs that we talked about.

  124. 26:15

    So we talked about the, um, how to use it as MCP, right? But here you can see you can just use it as web service APIs as well. So you can generate and by passing it a JSON object that has the description and the requirements, it can generate the files in that Rust project that meets your description,

  125. 26:37

    right? You know, so it's, um, um... And then follow-up tools would be able to separate out those files and save them and, you know, things like that, which we have seen that in, in, uh, in IDE, that's the Cursor can already do that.

  126. 26:50

    When it sees things like that, it knows which file it's operating and then it would be able to write into that file. So you can build your own tools to do that as well.

  127. 26:56

    You know, if you have autonomous agents works that you have to do, right? And then the second is compile and fix errors. So it's the same as we have just seen in our, uh, in our Cursor demo, which is, you know, send, um, you know, flat-- combine all the files in your project into one single flat text

  128. 27:13

    file and separate it by certain markers, and then send that to the API. And the API would run the Rust compiler, would run the large language model to fix any errors and then return the, um, the whole project in the same format back to you.

  129. 27:28

    So you can, from that point on, you can continue to process it, right? And, you know, that's, uh, obviously with API, uh, we also have MCP service, which is the same as, you know, so it's just using a command.

  130. 27:41

    So the documentation here just shows how to use a command line MCP client instead of Cursor to, um... But if you, um, in any, you know, I would say modern agent framework today, um, you would have MCP integration.

  131. 27:56

    So, so you will have to figure out how to integrate MCP servers into your framework. But, um, once you do that, it's just a very standard tool cost that you can ask your large language model to figure out when to generate code in Rust and when to fix, compile and fix code in Rust, right?

  132. 28:13

    So those are, yeah, that's pretty much, um, what I want to cover in this talk. Um, uh, what I want to emphasize is this is pretty much a work in progress.

  133. 28:23

    And, uh, um, so our, um, second, um, you know, Linux Foundation internship is still ongoing and the progress is being tracked by, um, on GitHub in this issue. So if you are interested, um, you know, um, come check it out.

  134. 28:38

    Um, come check out the works that we have done and, uh, and we'd love your contribution. You know, I think, um, because I, uh, I truly believe that, um, you know, for, um, you know, the, the road to AGI is AI coders and, uh, Rust is the best language for AI coders to use.

  135. 28:54

    It's far better for AI than, say, Python or JavaScript, okay? So, you know, so we want to build, um, a larger knowledge base and make this smarter and, uh, um, make more-- create more functionalities for other agents to use.

  136. 29:08

    So, um, thank you very much and, uh, um, I hope I will see you on GitHub.