You can view the code and live example on my Vercel site: Rust Smart Contract Developer
git clone https://github.com/Perpernet/RUST_SC_DEV2. Set your OpenAI API key
export OPENAI_API_KEY="sk_..."(or in .env.example and rename it to .env).
npm installnpm run dev5. Navigate to http://localhost:3000.
You can deploy this project to Vercel or any other platform that supports Next.js.
RUST_SC_DEV is an AI-powered assistant designed to streamline Solana smart contract development using Rust. It provides code generation, debugging support, and best practices guidance for writing and deploying Solana programs. The project aims to simplify the development workflow by offering an integrated environment where users can build, test, and deploy Solana programs using AI-driven tools. In addition to core development support, RUST_SC_DEV will feature simple interface builders for interacting with Solana programs. These builders will allow developers to create user interfaces (UIs) that communicate with Solana-based applications, making it easier to integrate Rust programs into larger blockchain projects.
Future Integration I plan to integrate a Retrieval-Augmented Generation (RAG) system using the RAGBuilder library to enhance the assistant's capabilities. This will allow the AI agent to use up-to-date Solana documentation and other external resources dynamically, improving the quality and context of its code suggestions.
app/components/chat.tsx- handles chat rendering, streamingapp/components/file-viewer.tsx- handles uploading, fetching, and deleting files for file search
api/assistants-POST: create assistant (only used at startup)api/assistants/threads-POST: create new threadapi/assistants/threads/[threadId]/messages-POST: send message to assistantapi/assistants/threads/[threadId]/actions-POST: inform assistant of the result of a function it decided to callapi/assistants/files-GET/POST/DELETE: fetch, upload, and delete assistant files for file search
Let me know if you have any thoughts, questions, or feedback at perpernetwork@gmail.com Use 60seconds delay if publish code on Vercel
