Configuration
Quasar.toml project configuration and global config reference.
Quasar uses two configuration files: a per-project Quasar.toml at the project root, and a global ~/.quasar/config.toml for user preferences.
Project Configuration (Quasar.toml)
Created by quasar init and read by quasar build, quasar test, and other project-aware commands.
Full Schema
[project]
name = "my-program"
[toolchain]
type = "solana"
[testing]
framework = "mollusk"[project]
| Field | Type | Required | Description |
|---|---|---|---|
name | string | yes | The program name. Used as the crate name, binary name, and for keypair lookup in target/deploy/. Hyphens are converted to underscores for the Rust module name. |
[toolchain]
| Field | Type | Required | Description |
|---|---|---|---|
type | string | yes | Build toolchain to use. |
Valid values:
| Value | Description |
|---|---|
"solana" | Uses cargo build-sbf from the Solana SDK. The standard, stable toolchain. |
"upstream" | Uses cargo build-bpf (alias for cargo build --release --target bpfel-unknown-none) with sbpf-linker from blueshift-gg/sbpf-linker. Produces smaller binaries and gives access to nightly Rust features. Requires sbpf-linker on PATH (install via cargo install-with-gallery). |
[testing]
| Field | Type | Required | Description |
|---|---|---|---|
framework | string | yes | Testing framework to use. |
Valid values:
| Value | Language | Description |
|---|---|---|
"none" | -- | No test framework. quasar test is disabled. |
"mollusk" | Rust | Lightweight SBF emulator for unit tests. Fast iteration, no validator needed. |
"quasarsvm-rust" | Rust | Full SVM simulation with Rust test harness. Supports CPI, sysvars, and multi-program scenarios. |
"quasarsvm-web3js" | TypeScript | SVM simulation with @solana/web3.js client via Mocha. Integration-test style. |
"quasarsvm-kit" | TypeScript | SVM simulation with @solana/kit client via Mocha. Modern Solana SDK. |
Framework behavior:
- Rust frameworks (
mollusk,quasarsvm-rust):quasar testrunscargo testand parses output - TypeScript frameworks (
quasarsvm-web3js,quasarsvm-kit):quasar testruns Mocha with JSON reporter
Example Configurations
Minimal project with Solana toolchain and no tests:
[project]
name = "my-program"
[toolchain]
type = "solana"
[testing]
framework = "none"Full project with upstream toolchain and Rust tests:
[project]
name = "my-defi-protocol"
[toolchain]
type = "upstream"
[testing]
framework = "quasarsvm-rust"Global Configuration (~/.quasar/config.toml)
User preferences across all projects. Created when you run quasar init or quasar config set.
Location: ~/.quasar/config.toml
Full Schema
[defaults]
toolchain = "solana"
framework = "mollusk"
template = "minimal"
[ui]
animation = true
color = true
timing = true[defaults]
Saved preferences used by quasar init when skipping prompts (with -y or by providing a project name).
| Field | Type | Valid Values | Default |
|---|---|---|---|
toolchain | string (optional) | "solana", "upstream" | not set |
framework | string (optional) | "none", "mollusk", "quasarsvm-rust", "quasarsvm-web3js", "quasarsvm-kit" | not set |
template | string (optional) | "minimal", "full" | not set |
When a default is not set, quasar init -y uses the framework's built-in default.
[ui]
Controls CLI output behavior.
| Field | Type | Default | Description |
|---|---|---|---|
animation | bool | true | Show the animated banner on quasar init. Automatically set to false after first run. |
color | bool | true | Use colored terminal output. |
timing | bool | true | Show build timing information (e.g., "Build complete in 1.2s"). |
Precedence
- Project config (
Quasar.toml) is authoritative for build and test behavior. - Global config (
~/.quasar/config.toml) provides defaults forquasar initand UI preferences. Global defaults do not override project settings.
Managing configuration
quasar config
Without a subcommand, opens an interactive menu.
quasar config get <KEY>
Read a config value.
$ quasar config get ui.animation
true
$ quasar config get defaults.toolchain
solanaquasar config set <KEY> <VALUE>
Write a config value. Invalid values are rejected with valid options shown.
$ quasar config set ui.color false
ui.color = false
$ quasar config set defaults.framework quasarsvm-rust
defaults.framework = quasarsvm-rust
$ quasar config set defaults.toolchain invalid
invalid value for defaults.toolchain: invalid
valid: solana, upstreamBoolean values accept: true, false, 1, 0, yes, no, on, off.
To unset a default, use none, null, or an empty string:
$ quasar config set defaults.toolchain nonequasar config list
Print all config values and the file path.
$ quasar config list
config: /Users/you/.quasar/config.toml
[defaults]
toolchain = solana
framework = mollusk
template = minimal
[ui]
animation = false
color = true
timing = truequasar config reset
Restore factory defaults. Preserves animation = false if previously disabled.
$ quasar config reset
config reset to defaultsAll config keys
| Key | Scope | Type | Valid Values |
|---|---|---|---|
defaults.toolchain | Global | string | solana, upstream |
defaults.framework | Global | string | none, mollusk, quasarsvm-rust, quasarsvm-web3js, quasarsvm-kit |
defaults.template | Global | string | minimal, full |
ui.animation | Global | bool | true, false |
ui.color | Global | bool | true, false |
ui.timing | Global | bool | true, false |
project.name | Project | string | any valid crate name |
toolchain.type | Project | string | solana, upstream |
testing.framework | Project | string | none, mollusk, quasarsvm-rust, quasarsvm-web3js, quasarsvm-kit |
