Tools

Everything you need to write, run, format and ship Salam programs lives in one command and a handful of editor plugins.

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 editor

VS Code plugin

Highlighting for English and Persian code, plus run, build, check and format through the Salam compiler, directly in Visual Studio Code.

Install from the VS Code marketplace

Code translator

Turn 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.salam

The salam command

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.salamFind errors fast: lex, parse and type-check without building
salam run app.salamCompile and run, without keeping the executable
salam exec app.salamRun on the interpreter, with no C compiler needed
salam build app.salamBuild a native executable; add --target to cross compile
salam new myappCreate a new project directory, with --lang=fa for a Persian one
salam format .Format every Salam file in the directory
salam docGenerate API documentation as an HTML page
salam web page.salamBuild a web page from the layout language and Salam scripts
salam js app.salamCompile to JavaScript to run in the browser
salam cliAn interactive prompt for trying out snippets
salam debug app.salamBuild with debug information and open the debugger

Editors

The Salam plugins highlight both the English and the Persian keyword set, and their word lists are generated from the compiler's own tables.

  • VS Code
  • Vim and Neovim
  • Sublime Text
  • Emacs
  • JetBrains
  • Kate and KDevelop
  • Geany
  • gedit and GNOME
  • Notepad++
  • GNU nano
  • micro

Standard library

More than 80 packages ship with the language, and every one of them has a Persian name too. A sample:

  • Strings and Unicode
  • Files and directories
  • JSON, XML, YAML, TOML and CSV
  • HTTP, TLS and SSH
  • Cryptography and JWT
  • Databases
  • Time and calendars
  • Regular expressions
  • Images and OpenCV
  • Tensors, machine learning and ONNX
  • Concurrency and channels
  • Testing