Skip to yearly menu bar Skip to main content


Poster
in
Workshop: Challenges in Deployable Generative AI

RustGen: An Augmentation Approach for Generating Compilable Rust Code with Large Language Models

Xingbo Wu · NathanaĆ«l Cheriere · Cheng Zhang · Dushyanth Narayanan

Keywords: [ Rust ] [ code generation ] [ LLM ]


Abstract:

Foundation models show an impressive ability to write code snippets. However, there are still challenges when generating code for resource-poor programming languages. In this work, using Rust as an example, we tackle these challenges through in-context learning, with additional components that feed back compile errors to the LLM until it converges on a runnable code that is free of several common programming errors. We describe the specific techniques that allow us to do this -- history-based search, prompt engineering, and syntax-based skeletonization -- and evaluate their benefits on a set of code generation tasks in Rust.

Chat is not available.