Online editor
The Salam compiler is compiled to WebAssembly and runs entirely in your browser. Write code, run it and browse the examples with nothing installed.
Open the editorEverything you need to write, run, format and ship Salam programs lives in one command and a handful of editor plugins.
The Salam compiler is compiled to WebAssembly and runs entirely in your browser. Write code, run it and browse the examples with nothing installed.
Open the editorHighlighting for English and Persian code, plus errors as you type, completion, hover, go to definition, rename and formatting through the Salam language server, directly in Visual Studio Code.
Install from the VS Code marketplaceTurn an English program into a Persian one or the other way round. Keywords, types and the entry point are rewritten for you.
salam translate fa program.salamA chat assistant that knows the language and its standard library. It writes Salam, checks it with the compiler and explains errors.
A desktop app for Windows, macOS and Linux that lets Salam AI run commands and edit files in a folder on your computer, within limits you set.
Connect Claude Code, Cursor and other MCP clients to the Salam tools, or call the assistant from your own code through an OpenAI-compatible API.
Add packages from GitHub with salam add, write your own with salam.toml and publish it by pushing a git tag.
The compiler, runner, formatter and documentation generator are all subcommands of one executable. The ones you will use most:
| Command | What it does |
|---|---|
salam check app.salam | Find errors fast: everything salam build does before code generation, imported packages included, with exit code 1 when any are printed. Errors from code generation, the C compiler or the linker still need a build |
salam check app.salam --fix | Apply the safe fixes the compiler suggests (missing or unused imports, a needless mut, return written for ret, a misspelled name with exactly one close match) in place, then check again; a fix with more than one possible answer stays a suggestion |
salam add github.com/owner/repo | Add a package to the project; the package manager also covers remove, update, search and publishing your own |
salam test | Run the test_ functions in every *_test.salam file, each file in its own process |
salam run app.salam | Compile and run, without keeping the executable |
salam exec app.salam | Run on the interpreter, with no C compiler needed |
salam build app.salam | Build a native executable; add --target to cross compile |
salam build app.salam --backend=native | Build with Salam's own x86-64 code generator, with no C compiler or LLVM involved |
salam new myapp | Create a new project directory, with --lang=fa for a Persian one |
salam init | Turn this folder into a project: it asks for the name, type (cli, http or dsl), platforms, design system and web mode, and writes a starter project; -y takes the defaults |
salam format . | Format every Salam file in the directory |
salam doc | Generate API documentation as an HTML page |
salam lsp | The language server editors talk to for errors, completion and navigation as you type |
salam serve | Serve a folder over HTTP, or with --config=FILE run several sites from one config file (virtual hosts, redirects, caching, PHP); --test only checks the file |
salam sql check src --schema=migrations | Check every SQL query against the schema, without a database |
salam sql generate q --schema=db | Generate typed query functions from annotated SQL files |
salam build page.salam --platform=web | Build a web page from the layout language; --platform also takes js, android, ios, linux, macos, windows and all |
salam build --platform=android app.salam -o out -- [options] | Build a program with the native UI into an Android APK; everything after -- goes to the app builder: --icon sets the launcher icon (adaptive, with a themed layer), --splash-color and --splash-icon the launch screen, --abi all, --split and --size pick ABIs, per-ABI APKs and a size build, --version, --build, --min-sdk, --target-sdk, --orientation and --category the identity (or an [app.mobile] table in salam.toml; the command line wins); --release and --aab sign and bundle it, and salam run --platform=android installs and starts it; --assets DIR and --fonts DIR ship files, --permission NAME declares a permission; needs a JDK 21 and the Android SDK with an NDK |
salam build --platform=ios app.salam -o out -- [options] | Build a program with the native UI into an iOS app bundle, for the simulator or with --device a phone (after -- go the app builder options: --team, --profile and --sign-identity sign it, --ipa also writes an .ipa); needs Xcode |
salam build app.salam --platform=js | Compile to JavaScript to run in the browser |
salam cli | An interactive prompt for trying out snippets |
salam debug app.salam | Build with debug information and open the debugger |
The Salam plugins highlight both the English and the Persian keyword set, and their word lists are generated from the compiler's own tables. Editors with a language server client, among them VS Code, Neovim, Emacs, Sublime Text, Kate and the JetBrains IDEs, also get errors, completion and navigation as you type from salam lsp, the language server built into the compiler.
More than 170 packages ship with the language, and every one of them has a Persian name too. A sample: