UStackUStack
Better Sol icon

Better Sol

Better Sol helps you write Solana programs in TypeScript—one file defines both the program and a typed client. No Rust needed.

Better Sol

What is Better Sol?

Better Sol is a tool for writing Solana programs using TypeScript instead of Rust. It’s designed around a single-program source pattern where one file defines your on-chain program and a typed client to interact with it.

The core purpose is to streamline the Solana developer workflow by keeping program logic and the corresponding client types together, so you can build and use Solana functionality without switching to Rust.

Key Features

  • TypeScript-first Solana program authoring: write the program in TypeScript rather than Rust.
  • Single-file program + typed client: define both the Solana program and a typed client in one file.
  • Typed client generation: the client interface is tied to the program definition so your interactions can be type-aware.
  • Reduced language boundary: keep both on-chain code and the client API in the same TypeScript codebase.

How to Use Better Sol

  • Create a single Better Sol file that contains both your Solana program definition and the typed client.
  • Implement the program logic in that same file.
  • Use the typed client from the same code to build transactions and interact with your program.
  • Follow the project’s documented workflow (as provided on the site) to build and deploy the Solana program.

Use Cases

  • Building a Solana smart contract in TypeScript: teams that prefer TypeScript for both front-end and back-end logic can keep Solana development in the same language.
  • Creating a strongly typed client for program interaction: developers can use the typed client interface to reduce manual wiring when calling instructions.
  • Prototyping new on-chain features: keep program and client in one place to iterate faster on instruction shapes and data types.
  • Sharing program APIs within a TypeScript monorepo: when client code lives alongside other TypeScript services, a unified file can simplify the boundary between program and consumer code.
  • Educating or onboarding developers to Solana: developers who want to avoid Rust can still work through program definition and client usage in TypeScript.

FAQ

Does Better Sol require writing Rust programs? No. The product positioning states you can write Solana programs in TypeScript, with no Rust needed.

Is the program and client defined separately or together? Better Sol is described as using a single file to define both the program and a typed client.

What language is the typed client based on? The typed client is described in the context of TypeScript development, since the program is written in TypeScript.

Can I use Better Sol for client-only integration with an existing program? The provided site content focuses on defining a program and typed client in one file. It doesn’t explicitly confirm whether it supports client-only usage for an already-deployed, externally defined program.

Alternatives

  • Rust-based Solana development frameworks: if you’re comfortable with Rust, you can write programs in the language natively supported by many Solana toolchains, but you’ll typically maintain a clearer boundary between on-chain Rust and off-chain client code.
  • TypeScript-based client libraries for Solana: if your main goal is typed or structured client interactions, separate client tooling can help even when the program itself is written in Rust.
  • Generic blockchain SDK approach: you can build Solana instruction layouts and transaction flows using standard libraries, but you may have more manual work to keep client types aligned with program logic.
  • Other “program definition + generated client” tool patterns: some tools generate client code from program specifications; these may differ in how they connect instruction schemas to client types and whether they are Rust- or TypeScript-first.