OxL Reference

Installing from the archive

The release archive on GitHub is oxl-1.0.0-beta-linux-x86_64.tar.xz (next to it lies the checksum file SHA256SUMS).

sh
curl -LO https://github.com/DesCaldnd/OxwaldLink/releases/download/v1.0.0-beta/oxl-1.0.0-beta-linux-x86_64.tar.xz
curl -LO https://github.com/DesCaldnd/OxwaldLink/releases/download/v1.0.0-beta/SHA256SUMS
sha256sum -c SHA256SUMS --ignore-missing          # oxl-1.0.0-beta-linux-x86_64.tar.xz: OK

sudo mkdir -p /opt && sudo tar -C /opt -xJf oxl-1.0.0-beta-linux-x86_64.tar.xz
export PATH=/opt/oxl-1.0.0-beta/bin:$PATH
oxl --version

To have PATH set in every shell, add the export line to ~/.bashrc or ~/.zshrc. Install the system dependencies first.

What is inside#

sh
oxl-1.0.0-beta/
  bin/oxl                    компилятор и все инструменты: build, run, test, dev, fmt, doc, lsp, dap, db, …
  bin/oxl-docs               сервер документации (написан на OxL, сайт встроен в бинарник)
  lib/oxl/                   исходники стандартной библиотеки (std/) и библиотеки рантайма (liboxlrt.a, заголовки)
  share/oxl/vscode/*.vsix    расширение для VS Code
  share/oxl/tree-sitter-oxl/ грамматика tree-sitter (Neovim, Helix, Zed, Emacs)
  share/oxl/lldb/            pretty-printers значений OxL для lldb
  share/oxl/examples/        примеры: hello, streams, bank-saga, shop, …
  share/doc/oxl/site/        документация: статический сайт (откройте index.html)

If the archive is unpacked elsewhere, oxl finds the standard library and the runtime next to itself. With an unusual layout, name them explicitly (OXL_STD_DIR, OXL_RUNTIME_LIB).

Documentation#

The site you are reading is in the archive. Two ways to open it:

sh
xdg-open /opt/oxl-1.0.0-beta/share/doc/oxl/site/index.html
oxl-docs --port 8080

oxl-docs is a program written in OxL (std.web, the site files are embedded and compressed): the port is --port or OXL_DOCS_PORT, the address --host or OXL_DOCS_HOST (default 0.0.0.0:8080); GET /healthz answers liveness checks. To publish behind a reverse proxy, proxy to this port. The PDF versions (full and per section, ru and en) are separate files oxl-<version>-<lang>[-<section>].pdf on the release page.

Editor extensions#

Install share/oxl/vscode/oxl-lang-*.vsix with code --install-extension: see VS Code. The tree-sitter grammar and the settings of other editors are in the IDE section.

Upgrading and removing#

Every version lives in its own directory oxl-<version>: to upgrade, unpack the new archive next to the old one and switch PATH (or the symlink /opt/oxl). To remove: rm -rf /opt/oxl-1.0.0-beta and the PATH line from the shell profile. The VS Code extension: code --uninstall-extension oxwaldlink.oxl-lang. The build and package cache is in the OxL home ($OXL_HOME, otherwise $XDG_CACHE_HOME/oxl or ~/.cache/oxl) and can be deleted separately.

OxL 1.0.0-beta · Documentation version 1.0.0-beta© OxwaldLink · generated from the Standard, the std sources and the guides