Installing Soplang
Download Soplang, build it from source, or run it via Docker. A simple, universal setup guide.
This guide shows three ways to get started with Soplang: downloading a prebuilt release, building from source, or using the official Docker image.
General Download (All Platforms)
- Download: Grab the latest release for your platform from the downloads page.
- Extract / Install: Unzip or install the package as provided by the release. If it’s a single binary, place it somewhere in your PATH (e.g.,
~/binon UNIX-like systems). - (Optional) Add to PATH: Ensure the
soplangbinary is available on your PATH. For example (shell/zsh):echo 'export PATH="$HOME/bin:$PATH"' >> ~/.zshrc && source ~/.zshrc # or ~/.bashrc - Verify: Open your terminal and run:
soplang --version
Run Your First Program
hello.sop
qor("Hello, World!")
Execute the file:
soplang hello.sopBuild from Source
Soplang is written in Rust. With the Rust toolchain (rustc and cargo) installed:
git clone https://github.com/soplang/soplang.git
cd soplang
cargo build --releaseThe binary is created at target/release/soplang. Try it with one of the bundled examples:
./target/release/soplang examples/01_hello.sop
./target/release/soplang # start the interactive REPLCopy target/release/soplang to a folder on your PATH to use it everywhere.
Use Docker (No Local Install)
If you already have Docker, you can run Soplang without installing anything else.
1) Pull the Image
docker pull soplang/soplang:latest2) Run an Interactive Session
docker run -it --rm soplang/soplang3) Run a Local File
Mount your project directory and execute a file:
# from your project directory
docker run -it --rm -v "$PWD":/app -w /app soplang/soplang soplang hello.sopChecksums & Offline Install
- Verify downloads: Compare the file’s checksum with the one on the downloads page.
- Offline: Keep the extracted folder/binary and run directly—no internet required after download.
Troubleshooting
“command not found”
Make sure soplang is on your PATH, or run it via Docker as shown above.
Permission denied (UNIX-like)
If you downloaded a binary, grant execute permissions:
chmod +x /path/to/soplang