Getting Started
Quick Start
Dragonstone is both an interpreted and compiled, high-level,
object-oriented programming language. It uses .ds or .dragonstone for scripts, .eds for
embedded use, and .forge for package manifests.
Dragonstone File Extensions
.ds or .dragonstone
Standard source files for scripts and applications.
.eds
Embedded scripts for integrations and tooling.
.forge
Manifest used by the Forge package manager.
Forge Package Manager
A typical Dragonstone project includes a .forge TOML file where you
list metadata like name, version, authors, and dependencies. Think of it
as the single source of truth for your project.
# forge.toml
[package]
name = "your_project_name"
version = "0.1.0"
authors = "your_name_here"
Installing Dragonstone
- Download the latest release for your platform. From the download page or via GitHub and for full instructions.
- Add the Dragonstone binary to your PATH (if building from source).
- Verify the install by running
dragonstone --version.
Using the Interpreter
Run a script directly to get instant feedback while prototyping.
dragonstone run hello.ds
Using the Compiler
Compile for production or distribution when you want a standalone
binary. You can also pass the --target flag to specify
your desired target such as bytecode or llvm.
To build:
dragonstone build hello.ds
Or to build and run:
dragonstone build-run hello.ds
Select between native (interpreter) or core (compiler) backends.
dragonstone run --backend native examples/hello_world.ds
By default, dragonstone will use native (interpreter), however, you can change it anytime.
export DRAGONSTONE_BACKEND=native dragonstone run examples/hello_world.ds
Or export the flag once for the CLI:
export DRAGONSTONE_BACKEND=native
To run files in terminals where Dragonstone has not been added to evn path (and terminals like Bash):
./bin/dragonstone.exe run examples/hello_world.ds