# Salam Programming Language
> Salam is a fast, statically typed, open source systems language you can write in English or in Persian, and compile to a native executable for Linux, macOS, Windows and the web.
Salam has one language with two spellings: every keyword, type, standard library package and error message has an English and a Persian name, and both compile to the same native program. The course below teaches the language from the first program onward, and the standard library reference lists every package with runnable examples. This file follows the llms.txt convention; the same content in full is in llms-full.txt.
## Pages
- [Salam tooling](https://salamlang.github.io/Salam/tools/): The Salam online editor, the VS Code plugin and eleven more editors, the English and Persian code translator, the salam commands and more than 80 standard library packages.
- [Salam AI](https://salamlang.github.io/Salam/ai/): Salam AI answers questions about the Salam programming language, writes and explains Salam code, and with Salam Agent works on your own computer. Free to use with a Salam account.
- [Salam Agent](https://salamlang.github.io/Salam/agent/): Download Salam Agent, the desktop app that lets Salam AI work on your computer: run commands, use Docker and WSL and edit files in a folder you choose, within the access level you set for each chat.
- [Learn the Salam programming language](https://salamlang.github.io/Salam/learn/): A free and complete course in the Salam programming language, in 45 lessons: from your first program through structs, enums, generics, interfaces, packages and threads to building web pages: every HTML element, every CSS property and every browser event written in Salam, with runnable examples, their real output and a live preview of each page.
- [The Salam standard library](https://salamlang.github.io/Salam/std/): Reference for the Salam standard library: every package, function, struct and constant, with a plain explanation and a complete example that runs.
- [The Salam community](https://salamlang.github.io/Salam/community/): Join the Salam community: source code on GitHub, discussion in the Telegram group and on Discord, issue reports, and the ways you can contribute to an open source programming language.
- [Site map](https://salamlang.github.io/Salam/sitemap/): Every page, lesson and standard library package of the Salam programming language website in one list, plus the editor, the AI assistant, the Telegram bot and the project links.
- [Install the Salam programming language on Windows, Linux and macOS](https://salamlang.github.io/Salam/install/): Download and install Salam with a single command on Windows, Linux and macOS, or run it in Docker. No administrator access needed.
- [How fast is Salam?](https://salamlang.github.io/Salam/speed/): Across 42 equivalent programs, Salam ran 13% faster than Rust, 13% faster than C, 13 times faster than PHP and 70 times faster than Python.
## Course
- [Your first program](https://salamlang.github.io/Salam/learn/start/): The entry point, running a program, printing output, exit codes, input, comments and the shape of a program
- [Variables and constants](https://salamlang.github.io/Salam/learn/variables/): Declaring with :=, mutable variables, scope, globals, constants and naming rules
- [Types](https://salamlang.github.io/Salam/learn/types/): Whole and decimal numbers, overflow, booleans, characters, mixing types and conversion
- [Operators](https://salamlang.github.io/Salam/learn/operators/): Arithmetic, division and remainder, powers, comparison, logic, the ternary, compound assignment, bitwise flags and precedence
- [Strings and text](https://salamlang.github.io/Salam/learn/strings/): String literals and escapes, joining text, bytes and characters, the str package, comparing text and reading numbers from text
- [Conditions](https://salamlang.github.io/Salam/learn/conditions/): if, else if and else, comparison words, and and or, early returns, comparing floats and the rules a condition follows
- [Loops](https://salamlang.github.io/Salam/learn/loops/): repeat with a count, a range and a step, the until loop and its traps, loops that end with break, each over arrays, vectors, maps and strings, nested loops, break N and continue
- [match and switch](https://salamlang.github.io/Salam/learn/match/): Choosing between cases with match and switch: values, strings, enums, data and guards, struct patterns, fallthrough and switch inside loops
- [Functions](https://salamlang.github.io/Salam/learn/functions/): Declaring and calling functions, early return, default values, several results, recursion, overloads, reference parameters and main's exit code
- [Anonymous functions](https://salamlang.github.io/Salam/learn/lambdas/): Functions as values: anonymous functions, the function type, sorting with a comparator, functions that return functions and what a lambda captures
- [defer and function modifiers](https://salamlang.github.io/Salam/learn/defer/): Running cleanup at the end of a block with defer, in what order and when, plus the pure, inline, noinline, noret and deprecated modifiers
- [Arrays and slices](https://salamlang.github.io/Salam/learn/arrays/): Arrays, indexing, arrays of a given size, searching and totals, two dimensional arrays, copies and slices that write through
- [Vector and HashMap](https://salamlang.github.io/Salam/learn/collections/): Growable lists with Vector, key and value pairs with HashMap, sorting, and Set, Stack and Queue
- [Structs](https://salamlang.github.io/Salam/learn/structs/): Related data together, methods and this, pub and private, printing, copying, static members and embedding
- [Enums](https://salamlang.github.io/Salam/learn/enums/): A closed set of cases, chosen values, enums in structs, enums that carry data, and Result with ?
- [New types and operators](https://salamlang.github.io/Salam/learn/custom-types/): Type aliases, distinct types with their own methods and operators, operator overloading in structs, and Variant
- [Generics and interfaces](https://salamlang.github.io/Salam/learn/generics/): Generic functions and containers, interfaces, impl, bounds and dyn collections
- [Packages and files](https://salamlang.github.io/Salam/learn/packages/): Packages, include and import, pub and privacy, folder packages and project layout
- [What the compiler insists on](https://salamlang.github.io/Salam/learn/rules/): The strict rules of Salam, the error code for each, and how to fix them
- [Values, references and memory](https://salamlang.github.io/Salam/learn/memory/): Copies and sharing, copy and deep_copy, freeing memory, who frees a string, pointers and memcheck
- [Conditional compilation](https://salamlang.github.io/Salam/learn/compile-time/): Code for each operating system and processor, build flags with -D, and debug-only checks, all decided while compiling
- [Working with C](https://salamlang.github.io/Salam/learn/c-interop/): Calling C functions with extern, printf and other variadic functions, pointers and buffers, linking libraries, and handing Salam functions to C
- [Concurrency](https://salamlang.github.io/Salam/learn/threads/): Threads with spawn and join, sharing data safely, channels and parallel loops
- [The layout language](https://salamlang.github.io/Salam/learn/layout/): Building web pages with layout: elements, attributes, styles, click handlers, components, layouts with parameters, and serving them from a Salam program
- [Pages and text](https://salamlang.github.io/Salam/learn/page-text/): The shape of a page, headings, paragraphs, line breaks and every text level element: emphasis, quotes, code, edits, dates, abbreviations and mixed direction text
- [Page structure and lists](https://salamlang.github.io/Salam/learn/page-structure/): Landmarks such as header, nav, main and footer, then lists, definition lists, details, dialogs, figures and addresses, and how to build a whole blog page from them
- [Links, images and media](https://salamlang.github.io/Salam/learn/page-media/): Links and anchors, images with alt text and responsive sources, image maps, audio and video with subtitles, frames, embeds, canvas, SVG and math
- [Tables](https://salamlang.github.io/Salam/learn/page-tables/): Tables for data: caption, header, body and footer sections, heading cells with scope, spanning cells, column groups, and how to style and scroll a table
- [Forms](https://salamlang.github.io/Salam/learn/page-forms/): Forms and every form control: labels, all the input types, validation, text areas, checkboxes, radio buttons, lists, buttons, output, progress and meters, files, and handling a submit in code
- [Head, scripts and global attributes](https://salamlang.github.io/Salam/learn/page-head/): The settings of the page, the head with meta and links, styles and scripts, templates and shadow trees, the attributes every element has, ARIA, data attributes and splitting a site into files
- [Styles and the box model](https://salamlang.github.io/Salam/learn/css-basics/): CSS from zero: style properties as attributes, values, units and colors, the box model, sizes, margins, display, overflow, CSS functions, global rules and reusable components
- [Fonts and text styling](https://salamlang.github.io/Salam/learn/css-text/): Font families and sizes, weights, web fonts, variable fonts, alignment, decoration, spacing, wrapping, text direction, vertical text, ruby and Persian typography, with every font and text property
- [Colors, backgrounds and effects](https://salamlang.github.io/Salam/learn/css-backgrounds/): Text and background colors, opacity, layered backgrounds, gradients, fitting images, filters, blend modes, masks, clip paths and text that wraps around a shape
- [Borders, outlines and shadows](https://salamlang.github.io/Salam/learn/css-borders/): The border shorthand and every side, logical sides, rounded corners, border images, outlines and focus rings, box shadows, broken boxes and the new corner shapes
- [Layout: flow, flex and grid](https://salamlang.github.io/Salam/learn/css-layout/): Normal flow, position and z index, float, flexbox, grid, alignment, multi-column text and right-to-left pages, with every layout property and an example for each
- [Responsive pages and states](https://salamlang.github.io/Salam/learn/css-responsive/): Pages that fit every screen: fluid sizes, media and container queries, dark mode, hover, focus and generated content, pointer, scrolling and print properties
- [Transitions and animations](https://salamlang.github.io/Salam/learn/css-motion/): Motion on a page: transitions, transforms and 3D, keyframe animations, motion paths, scroll driven animations, view transitions and respecting reduced motion
- [The rest of CSS](https://salamlang.github.io/Salam/learn/css-more/): Lists and counters, quotation marks, table settings, scroll snapping and scroll margins, anchor positioning, SVG fill and stroke, math, reading order and the other properties not covered before
- [Mouse events](https://salamlang.github.io/Salam/learn/events-mouse/): Making a page react to the mouse: handlers, click, double click, other buttons, the context menu, pointer position, drawing, enter and leave, bubbling and the wheel
- [Keyboard and forms](https://salamlang.github.io/Salam/learn/events-keys-forms/): Keys, focus, typing, text selection, form submit, reset and validation, the clipboard, details, popovers and dialogs: the events of every part of a page that people type into
- [Drag, touch, scroll and window](https://salamlang.github.io/Salam/learn/events-drag-touch/): Drag and drop between lists, pointer and touch events, scroll and window events, and the load, error and abort events of images
- [Media, animation and other events](https://salamlang.github.io/Salam/learn/events-media-more/): Audio and video events, a custom player, animation and transition events, slot changes, captions, canvas context loss and security policy violations
- [State, the DOM and timers](https://salamlang.github.io/Salam/learn/events-dom/): How the pieces of an interactive page fit: state in variables, reading and changing elements, classes and styles, creating and removing elements, timers, storage, dialogs, components with handlers and how to debug
- [Whole pages: six projects](https://salamlang.github.io/Salam/learn/web-projects/): Six complete pages that bring the lessons together: a landing page, a blog post with a sidebar, a sign up form with live checks, a dashboard with a CSS bar chart, a task list that remembers, and a photo gallery with a lightbox, plus how a Salam program serves a page
- [The English and Persian glossary](https://salamlang.github.io/Salam/learn/keywords/): Every Salam keyword, type, built-in function, built-in method and compile-time constant in both languages
## Standard library
- [core](https://salamlang.github.io/Salam/std/core/): The smallest package in Salam, for when the program must not carry on.
- [io](https://salamlang.github.io/Salam/std/io/): Reading from the keyboard, reading and writing files, and writing to standard error.
- [fmt](https://salamlang.github.io/Salam/std/fmt/): Turning numbers and booleans into text, aligning text, and building a string from a template.
- [conv](https://salamlang.github.io/Salam/std/conv/): Converting numbers and booleans to text and back, including Persian digits.
- [text](https://salamlang.github.io/Salam/std/text/): Converting a string to UTF-16 and back, for Windows and libraries that want that format.
- [result](https://salamlang.github.io/Salam/std/result/): Returning either a value or an error from a function, instead of throwing an exception.
- [option](https://salamlang.github.io/Salam/std/option/): A value that may or may not be there, without nulls and without magic numbers such as minus one.
- [str](https://salamlang.github.io/Salam/std/str/): Everything to do with text: searching, slicing, replacing, digits, case, and building long strings.
- [unicode](https://salamlang.github.io/Salam/std/unicode/): What Unicode knows about a character: category, script, writing direction, case, decomposition and composition.
- [arabic](https://salamlang.github.io/Salam/std/arabic/): Normalising Arabic-script text: Arabic yeh and kaf, vowel marks, tatweel, the zero width non-joiner and digits, for search and comparison.
- [bidi](https://salamlang.github.io/Salam/std/bidi/): The Unicode bidirectional algorithm: the right display order when right to left and left to right text are mixed.
- [regex](https://salamlang.github.io/Salam/std/regex/): Searching and replacing with a pattern: finding a number, an email address or a date in text and pulling it apart.
- [template](https://salamlang.github.io/Salam/std/template/): Filling text and HTML templates with values, with automatic escaping for safety.
- [i18n](https://salamlang.github.io/Salam/std/i18n/): A multilingual program: translating messages, placing values into them and choosing singular or plural.
- [math](https://salamlang.github.io/Salam/std/math/): The basic mathematics: powers and roots, logarithms, trigonometry, rounding, minimum and maximum, and the greatest common divisor.
- [rand](https://salamlang.github.io/Salam/std/rand/): Random numbers, text and choices: dice, one-time codes, unique identifiers and shuffling a list.
- [stats](https://salamlang.github.io/Salam/std/stats/): Descriptive statistics over a list of numbers: mean, median, variance, standard deviation and percentiles.
- [types](https://salamlang.github.io/Salam/std/types/): Recognising the type of a value from its text: a whole number, a decimal, a boolean or ordinary text?
- [bigint](https://salamlang.github.io/Salam/std/bigint/): Whole numbers of unlimited size: large factorials, cryptography, and any arithmetic that will not fit in 64 bits.
- [decimal](https://salamlang.github.io/Salam/std/decimal/): Exact decimal numbers for money and accounting, with none of the rounding error of floating point.
- [sort](https://salamlang.github.io/Salam/std/sort/): Sorting vectors with the default or your own comparison, binary search, and a dozen sorting algorithms to learn from.
- [collections](https://salamlang.github.io/Salam/std/collections/): Data structures: vector and map, stack, queue, deque, set, linked list, priority queue and counter.
- [os](https://salamlang.github.io/Salam/std/os/): Files, directories, system commands, program arguments and environment variables.
- [os/error](https://salamlang.github.io/Salam/std/os-error/): The last error from a file or process operation: its code, its message and the path that failed.
- [os/platform](https://salamlang.github.io/Salam/std/os-platform/): Identifying the system the program is running on: the operating system, the processor, the core count and the memory.
- [os/process](https://salamlang.github.io/Salam/std/os-process/): Running other programs, capturing their output, waiting for them and stopping them.
- [os/shell](https://salamlang.github.io/Salam/std/os-shell/): Running a command and getting its exit code, its output and its errors together.
- [os/temp](https://salamlang.github.io/Salam/std/os-temp/): Making a temporary file or directory under a unique name.
- [os/user](https://salamlang.github.io/Salam/std/os-user/): Who is running the program, and the standard directories that belong to them.
- [fs](https://salamlang.github.io/Salam/std/fs/): File times and permissions; the base of the file, dir and path packages.
- [fs/dir](https://salamlang.github.io/Salam/std/fs-dir/): Creating, listing, copying, moving and removing directories.
- [fs/file](https://salamlang.github.io/Salam/std/fs-file/): Reading and writing files, file information, copying and moving, and MD5 and SHA digests.
- [fs/path](https://salamlang.github.io/Salam/std/fs-path/): Working with file paths: joining them, separating the name and the extension, absolute and relative paths, and a safety check.
- [filepath](https://salamlang.github.io/Salam/std/filepath/): Path functions that never touch the file system; the same work as the fs/path package.
- [env](https://salamlang.github.io/Salam/std/env/): Environment variables: reading them with the right type, .env files, the run profile, and masking sensitive values.
- [flag](https://salamlang.github.io/Salam/std/flag/): Reading command line options such as --port 8080 and -v with the right type, and generating the help text.
- [cli](https://salamlang.github.io/Salam/std/cli/): Command line programs with several commands, like git commit, and asking the user questions.
- [config](https://salamlang.github.io/Salam/std/config/): Reading and writing INI, env and YAML settings files with dotted keys.
- [log](https://salamlang.github.io/Salam/std/log/): Recording what a program does, with levels, a prefix, structured fields, JSON output and writing to a file.
- [debug](https://salamlang.github.io/Salam/std/debug/): Tools for finding a bug: assertions, a hand-kept call stack, tracing and timing.
- [runtime](https://salamlang.github.io/Salam/std/runtime/): Facts about the running program: the system, the memory, the uptime and the build options.
- [testing](https://salamlang.github.io/Salam/std/testing/): Writing tests for your code: equality assertions, a pass and fail count, and a summary at the end.
- [error](https://salamlang.github.io/Salam/std/error/): Structured errors with a kind, a message, a chain of causes, metadata and a retry policy.
- [mem](https://salamlang.github.io/Salam/std/mem/): Working with memory directly: allocating and freeing, copying, arenas and pools, and leak checking.
- [term](https://salamlang.github.io/Salam/std/term/): Text colour and style, cursor movement, progress bars, reading keys and the mouse, and the terminal size.
- [time](https://salamlang.github.io/Salam/std/time/): The current time, durations, formatting and parsing dates, the monotonic clock, timers and tickers.
- [calendar](https://salamlang.github.io/Salam/std/calendar/): The Jalali, Hijri and Gregorian calendars: conversion, day arithmetic, month names and time zones.
- [thread](https://salamlang.github.io/Salam/std/thread/): Holding and waiting for the threads that spawn creates.
- [sync](https://salamlang.github.io/Salam/std/sync/): Mutexes, condition variables, wait groups, read-write locks, semaphores and once, for coordinating threads.
- [atomic](https://salamlang.github.io/Salam/std/atomic/): A counter and a flag that several threads can change safely without taking a lock by hand.
- [chan](https://salamlang.github.io/Salam/std/chan/): A channel for passing values from one thread to another, with a buffer, timeouts and closing.
- [pool](https://salamlang.github.io/Salam/std/pool/): Running one loop in parallel across several processor cores.
- [ctx](https://salamlang.github.io/Salam/std/ctx/): A context for cancellation and deadlines, passed from the main piece of work down to the smaller ones.
- [encoding](https://salamlang.github.io/Salam/std/encoding/): Turning text and data into Base64, hexadecimal and URL encoding.
- [encoding/json](https://salamlang.github.io/Salam/std/encoding-json/): Building and reading JSON: from a plain string through automatic struct conversion to streaming.
- [encoding/yaml](https://salamlang.github.io/Salam/std/encoding-yaml/): Reading YAML by path, building and writing it, and converting it to JSON.
- [encoding/csv](https://salamlang.github.io/Salam/std/encoding-csv/): Reading and writing CSV files, with correct quoting and conversion to a dynamic value.
- [encoding/toml](https://salamlang.github.io/Salam/std/encoding-toml/): Reading and writing TOML configuration files.
- [encoding/url](https://salamlang.github.io/Salam/std/encoding-url/): Taking a web address apart, building and editing its parameters, and resolving relative addresses.
- [encoding/query](https://salamlang.github.io/Salam/std/encoding-query/): Reading and building the query string of a web address, such as q=hello&page=2.
- [encoding/envfile](https://salamlang.github.io/Salam/std/encoding-envfile/): Reading and writing .env files, with variable substitution.
- [encoding/value](https://salamlang.github.io/Salam/std/encoding-value/): A dynamic value for data whose shape you do not know in advance; the shared language of every format in this group.
- [encoding/serde](https://salamlang.github.io/Salam/std/encoding-serde/): Detecting the format of a piece of text and converting JSON, YAML, TOML, XML and CSV into one another.
- [encoding/encerr](https://salamlang.github.io/Salam/std/encoding-encerr/): The shared error of the format readers: a kind, a message and a position in the text.
- [encoding/msgpack](https://salamlang.github.io/Salam/std/encoding-msgpack/): The compact binary MessagePack format for dynamic values.
- [encoding/binary](https://salamlang.github.io/Salam/std/encoding-binary/): Writing and reading numbers as bytes, big-endian or little-endian.
- [encoding/xml](https://salamlang.github.io/Salam/std/encoding-xml/): Reading, building and writing XML, with XPath, DTD validation, namespaces and a light simple interface.
- [encoding/protobuf](https://salamlang.github.io/Salam/std/encoding-protobuf/): Reading .proto files, the Protocol Buffers wire encoding, and generating Salam code from them.
- [compress](https://salamlang.github.io/Salam/std/compress/): Byte buffers, compression methods from RLE through DEFLATE, gzip and checksums.
- [archive](https://salamlang.github.io/Salam/std/archive/): Making and opening zip and tar archives, reading RAR, and gzipping a file.
- [npy](https://salamlang.github.io/Salam/std/npy/): Reading and writing NumPy .npy and .npz files.
- [excel](https://salamlang.github.io/Salam/std/excel/): Reading and writing Excel (xlsx), OpenDocument (ods) and CSV spreadsheets: sheets, cells, styles, formulas and dates.
- [data](https://salamlang.github.io/Salam/std/data/): Reading data for machine learning: CSV tables, batching samples, MNIST and images, and synthetic data.
- [net/tcp](https://salamlang.github.io/Salam/std/net-tcp/): TCP servers and clients: listening, connecting, reading and writing, TLS and a connection pool.
- [net/udp](https://salamlang.github.io/Salam/std/net-udp/): Sending and receiving UDP packets, with broadcast and multicast.
- [net/dns](https://salamlang.github.io/Salam/std/net-dns/): Finding the address of a name and asking for any kind of DNS record.
- [net/mime](https://salamlang.github.io/Salam/std/net-mime/): The media type of a file, the Content-Type header, and multipart form bodies.
- [net/proxy](https://salamlang.github.io/Salam/std/net-proxy/): Connecting through an HTTP or SOCKS5 proxy, alone or in a chain.
- [net/router](https://salamlang.github.io/Salam/std/net-router/): Routing HTTP requests, with parameters, groups and static files.
- [net/email](https://salamlang.github.io/Salam/std/net-email/): Sending email over SMTP and reading it over IMAP and POP3.
- [net/websocket](https://salamlang.github.io/Salam/std/net-websocket/): A two way connection that stays open between browser and server, with rooms for broadcasting.
- [net/http](https://salamlang.github.io/Salam/std/net-http/): HTTP servers and clients: handlers, text and JSON responses, cookies and sending requests.
- [net/http/middleware](https://salamlang.github.io/Salam/std/net-http-middleware/): The usual security, cache and CORS headers, and request logging, in one call.
- [net/http/validate](https://salamlang.github.io/Salam/std/net-http-validate/): Checking form input and answering with a 400.
- [net/http/session](https://salamlang.github.io/Salam/std/net-http-session/): User sessions over a cookie: keeping data between requests, and a CSRF token.
- [net/http/swagger](https://salamlang.github.io/Salam/std/net-http-swagger/): Writing OpenAPI documentation for an API and serving the documentation page.
- [net/http2](https://salamlang.github.io/Salam/std/net-http2/): The HTTP/2 protocol from the ground up: frames, HPACK header compression and streams.
- [net/socketio](https://salamlang.github.io/Salam/std/net-socketio/): A Socket.IO client: events, acknowledgements, namespaces and automatic reconnection.
- [dom](https://salamlang.github.io/Salam/std/dom/): Working with a web page in the browser: elements, events, timers and JavaScript objects.
- [web/canvas](https://salamlang.github.io/Salam/std/web-canvas/): Drawing shapes, text and images on a browser canvas element.
- [web/keys](https://salamlang.github.io/Salam/std/web-keys/): Keyboard state for browser games.
- [webpush](https://salamlang.github.io/Salam/std/webpush/): Sending notifications to browsers from a server, with VAPID keys and the standard encryption.
- [crypto](https://salamlang.github.io/Salam/std/crypto/): SHA and MD5 digests, HMAC signatures, secure random numbers and password hashing.
- [jwt](https://salamlang.github.io/Salam/std/jwt/): Making and checking JWT tokens, and guarding API routes.
- [tls](https://salamlang.github.io/Salam/std/tls/): Secure TLS 1.3 and 1.2 connections and public key cryptography tools, with no OpenSSL needed.
- [ssl](https://salamlang.github.io/Salam/std/ssl/): A familiar OpenSSL style interface for secure connections, on top of Salam's own TLS.
- [ssh](https://salamlang.github.io/Salam/std/ssh/): SSH connections, running a command on a server, and working with files over SFTP.
- [ftp](https://salamlang.github.io/Salam/std/ftp/): An FTP and FTPS client: listing a directory, uploading and downloading files.
- [rpc](https://salamlang.github.io/Salam/std/rpc/): JSON-RPC 2.0 and MessagePack-RPC: a server, a client and registering methods.
- [grpc](https://salamlang.github.io/Salam/std/grpc/): A gRPC server and client over HTTP/2: unary and streaming calls, metadata and status codes.
- [db/sql](https://salamlang.github.io/Salam/std/db-sql/): Read, check and type SQL without a database: a dialect-aware parser, a schema catalog and typed placeholders.
- [db](https://salamlang.github.io/Salam/std/db/): One interface shared by the database engines, schema migrations and a connection pool.
- [db/sqlite](https://salamlang.github.io/Salam/std/db-sqlite/): An SQLite database in one file or in memory.
- [db/mysql](https://salamlang.github.io/Salam/std/db-mysql/): Connecting to MySQL and MariaDB.
- [db/postgres](https://salamlang.github.io/Salam/std/db-postgres/): A PostgreSQL client written in Salam: connection strings and URIs, TLS, queries, transactions, pools and migrations.
- [db/redis](https://salamlang.github.io/Salam/std/db-redis/): A Redis client: keys and values, hashes, lists, sets and publishing.
- [db/typesense](https://salamlang.github.io/Salam/std/db-typesense/): A Typesense client: collections, documents, typo tolerant, faceted, grouped, vector and union search, synonyms, curation, API keys, analytics and clusters.
- [db/elasticsearch](https://salamlang.github.io/Salam/std/db-elasticsearch/): An Elasticsearch and OpenSearch client: documents, search, aggregations, bulk, SQL and index management.
- [db/meilisearch](https://salamlang.github.io/Salam/std/db-meilisearch/): A Meilisearch client: indexes, documents, full text, faceted, hybrid and federated search, settings, tasks and API keys.
- [db/opensearch](https://salamlang.github.io/Salam/std/db-opensearch/): An OpenSearch client: documents, bulk, the query DSL, aggregations, scroll and point in time, index admin, SQL and PPL, k-NN vector search, ISM, security and AWS signing.
- [graphql](https://salamlang.github.io/Salam/std/graphql/): A GraphQL server: schemas, resolvers, query execution and HTTP handling.
- [google](https://salamlang.github.io/Salam/std/google/): Google service account authentication for the Google APIs.
- [telegram/bot](https://salamlang.github.io/Salam/std/telegram-bot/): Building a bot with the Bot API: messages, buttons, webhooks and a polling loop.
- [node](https://salamlang.github.io/Salam/std/node/): A Salam program under Node.js: modules, files, processes and JavaScript objects.
- [aws](https://salamlang.github.io/Salam/std/aws/): Amazon S3, SQS and STS, and any S3 compatible service, with Signature Version 4.
- [llvm](https://salamlang.github.io/Salam/std/llvm/): Building, optimizing, running and linking code with LLVM.
- [llvm/triple](https://salamlang.github.io/Salam/std/llvm-triple/): The data layout and target features worked out from a triple, with no LLVM needed.
- [optim](https://salamlang.github.io/Salam/std/optim/): Neural network optimisers: SGD, Adam, RMSProp and learning rate schedules.
- [onnx](https://salamlang.github.io/Salam/std/onnx/): Reading and running ONNX models with no outside dependency.
- [gguf](https://salamlang.github.io/Salam/std/gguf/): Reading GGUF model files, the llama.cpp format.
- [webview](https://salamlang.github.io/Salam/std/webview/): A desktop program with an HTML interface in a native window.
- [tensor](https://salamlang.github.io/Salam/std/tensor/): Multi dimensional arrays and numeric operations for machine learning.
- [autograd](https://salamlang.github.io/Salam/std/autograd/): Reverse mode automatic differentiation for training models.
- [nn](https://salamlang.github.io/Salam/std/nn/): Neural network layers: linear, convolutional, recurrent, transformer, and checkpoints.
- [llm](https://salamlang.github.io/Salam/std/llm/): Running Llama and Qwen language models from a GGUF file.
- [matrix](https://salamlang.github.io/Salam/std/matrix/): Linear algebra: matrices, systems of equations, decompositions, eigenvalues and statistics.
- [image](https://salamlang.github.io/Salam/std/image/): Reading, editing and saving images, and writing text on them.
- [graph](https://salamlang.github.io/Salam/std/graph/): Graph theory: traversal, shortest paths, spanning trees, flow, coloring, communities and centrality.
- [ml](https://salamlang.github.io/Salam/std/ml/): Classic machine learning: preprocessing, regression, classification, trees, clustering and evaluation.
- [opencv](https://salamlang.github.io/Salam/std/opencv/): Computer vision with OpenCV: image processing, features, face detection, neural networks and video.
- [audio](https://salamlang.github.io/Salam/std/audio/): Sound as a clip of samples: cutting, mixing, measuring and converting it.
- [audio/wav](https://salamlang.github.io/Salam/std/audio-wav/): Reading and writing WAVE files: PCM, floating point, A-law and mu-law.
- [audio/dsp](https://salamlang.github.io/Salam/std/audio-dsp/): A Fourier transform, windows, filters and resampling for sound.
- [audio/codec](https://salamlang.github.io/Salam/std/audio-codec/): Open and save a sound file without naming its format.
- [audio/aiff](https://salamlang.github.io/Salam/std/audio-aiff/): Reading and writing AIFF and AIFF-C files.
- [audio/au](https://salamlang.github.io/Salam/std/audio-au/): Reading and writing the Sun and NeXT au format.
- [audio/flac](https://salamlang.github.io/Salam/std/audio-flac/): Lossless compression: reading and writing FLAC.
- [audio/tag](https://salamlang.github.io/Salam/std/audio-tag/): Reading and writing the tags on a song: title, artist, album and cover art.
- [audio/music](https://salamlang.github.io/Salam/std/audio-music/): Notes, scales, chords and tunings, Persian dastgah among them.
- [audio/synth](https://salamlang.github.io/Salam/std/audio-synth/): Making sound from nothing: oscillators, envelopes and voices.
- [audio/midi](https://salamlang.github.io/Salam/std/audio-midi/): Reading, writing and playing standard MIDI files.
- [audio/mp3](https://salamlang.github.io/Salam/std/audio-mp3/): Reading the frames, headers and VBR tags of an mp3 file.
## For AI agents
- [Full documentation in one file](https://salamlang.github.io/Salam/llms-full.txt): Every lesson and every standard library page as plain text, for loading into a model's context.
- [Salam agent skill (SKILL.md)](https://raw.githubusercontent.com/SalamLang/Salam/main/SKILL.md): The up-to-date reference for writing and porting Salam code: current syntax in English and Persian, the standard library, the compiler's strict rules and the layout language. Install it as a skill in Claude Code or any agent that reads SKILL.md files.
- [Claude Code plugin](https://github.com/SalamLang/Salam/tree/main/tools/mcp/claude-plugin): A plugin with a Salam skill and commands to check, run and look up the API of Salam code.
- [MCP server](https://github.com/SalamLang/Salam/tree/main/tools/mcp): A Model Context Protocol server written in Salam that gives a model the compiler (check, build, run, format) and the real standard library index.
## Optional
- [Source code on GitHub](https://github.com/SalamLang/Salam)
- [Releases and downloads](https://github.com/SalamLang/Salam/releases)
- [Online editor](https://editor.salamlang.ir)