Releases

Larva 0.8.0

Antril 0.8.0 and the Larva toolchain, with installers for Windows, Linux and macOS, a standard library that ships compiled, signed language packs, the Hive package manager and VS Code support.

Larva 0.8.0 is the toolchain for the Antril language, together with Antril 0.8.0, its language pack. This page lists what the release contains, area by area, with links to the documentation. To install it, see the download page or run the one-line installer for your system (see Install below).

Highlights

  • Installers for Windows, Linux and macOS. The Windows setup wizard, a portable zip, and, new in this release, .tar.gz archives with install.sh for Linux and macOS. The installers work for the current user, without administrator rights.
  • One-line install from www.antril.org, with install.ps1 on Windows and install.sh on Linux and macOS.
  • The standard library ships compiled. System.Core is installed as System.Core.dll, a Larva library, instead of source files compiled on first use.
  • Languages are signed packs. Antril lives in Languages/Antril, its files hashed in its manifest and the manifest signed. larva languages checks every installed pack.
  • A languages registry, new and still changing: larva languages install, publish and more, with packs signed by their author and by antril.org.
  • Hive is built into larva: signed packages, version ranges, hive.lock, and a public registry on www.antril.org with accounts and API tokens.
  • Memory per project. gc: default, refcount, arena or manual in .queen, and libraries built for another mode linked as their own GC domain.
  • Four back ends: LLVM, Larva's own x86-64 back end, WebAssembly, and the IL VM.
  • VS Code: the Antril and Larva extensions, with a language server that also checks borrows as you type.

What's in 0.8.0

The Antril language

  • Primitive types from i8 to i256, u8 to u256 and f16 to f256, plus iptr/uptr, str and any. A type without ? never holds null. See Basics.
  • Classes with access sections (public:, private:, internal:, inherited:, friendly:, file:), value types, base and final classes, interfaces with default bodies, properties, static classes and destructors. See Types.
  • Records that compare by content and copy with with. Tuples of any number of elements. Enums over integers, str or a value, and bitflag enums. See Records and Enums.
  • One loop keyword for every kind of loop, and switch with constant, comparison, range, type, property and positional patterns. See Control flow.
  • Function types (func<A> : R) and lambdas that capture, iterators with yield, generics with constraints such as T : number, T : new() and T : op +(T, T) : T, and variadic generics (T... with static loop). See Functions and generics.
  • User-defined operators, including new symbols with their own precedence, and extension blocks (ext, static ext, constrained ext<T : …>). See Operators and Extension blocks.
  • exception declarations, with try, catch and finally. See Errors and exceptions.
  • async/await over Task and Task<T>, and reactive classes with reactive fields, computed values, effect blocks and reacts methods. See Async and reactive code.
  • Destructors in every memory mode, region { } blocks, &T/&mut T references checked by the borrow checker (off by default, warn or enforce), pointers in unsafe code, unsafe: deny per project, and fixed buffers, including fixed T[] kept inside a final class's object. See Memory.
  • Calling C directly with [Import], C struct layouts, function pointers and exports. See Interop with C.
  • The full language reference, including every diagnostic.

Larva

  • larva new with the Console-App and Library templates. Templates are stored as Larva HIR, and each language writes them as its own source. See new.
  • larva run builds the current project only when something changed, then runs it. See run.
  • larva build with --check, --dll, --target native|wasm|wasm-llvm, --backend llvm|x64, -O0 to -O3, --borrowcheck, --cpu and --timings. See build.
  • larva lib compiles sources into a Larva library: a .dll that carries compiled Larva code. See lib.
  • larva config sets machine-wide defaults: GC mode, back end, target, optimization, CPU, reflection, borrow checker, unsafe code, generics, default access and Hive registries. See config.
  • .queen project files with the PROJ, BUILD, DEPS, SOURCES, FILES, RESOURCES and HIVE chunks, and resources built into the program (System.Resources). See Project files.
  • larva types, larva show and larva search browse the standard library, libraries and your own sources, in Antril or as HIR (--lang hir). See Exploring code.
  • larva bind writes a Larva library for a native .dll or .so, from a C header (preprocessed with clang when it is installed) or a .bind description. Binding profiles written in Antril (--profile) decide every name. See Native bindings.
  • Language packs: larva languages lists and verifies installed packs, and larva languages key and pack sign them. Packs from the languages registry, which is new, are installed with larva languages install. See Language packs and The languages registry.
  • Back ends: LLVM (the default, optimizing), Larva's own x86-64 back end (faster to compile), WebAssembly through LLVM (--target wasm-llvm) or Larva's own back end (--target wasm), and the IL VM for .lvm modules (larva run, dis, link, native). See Architecture.
  • Memory: a generational tracing collector with a parallel copying nursery, reference counting, arenas and manual memory. A dependency whose gc: differs from the program's is linked as its own GC domain, and text and bytes cross between domains with System.Exchange. See Garbage collection and GC domains.

Standard library

  • System.Core is written in Antril and installed compiled, as System.Core.dll. Browse it in the library browser.
  • Collections, text, Math over every number type (exact on integers and on f128/f256), Random, DateTime, reflection and Resources in System.
  • Files, folders, paths and streams in System.IO. JSON (JsonValue) and regular expressions (Regex) in System.Text.
  • TCP and HttpClient.Get in System.Net. Process and Stopwatch in System.Diagnostics.
  • Threads, locks, atomics and Parallel in System.Threading. Tasks in System.Threading.Tasks. System.Reactive.
  • System.Bindings.dll, which binding profiles are written against.

See the System.Core overview.

Hive

  • larva hive add, install, restore, info, list, verify and trust for using packages, and key, pack and publish for making them. See Using packages and Publishing packages.
  • Packages named Author/Name, with version ranges (@1.2, @^1.2, @>=1.2) and a hive.lock that pins each version's hash, key and registry.
  • Packages signed with ECDSA P-256. Every file is hashed in the manifest. Signing keys are remembered on first install, and nothing from a package runs when it is installed.
  • Compiled and source packages, and packages that wrap a library built elsewhere, such as a native binding.
  • Registries on the web, on any static HTTPS server, or in a folder. The public registry is https://www.antril.org/hive-api, with accounts, authors and API tokens. See The registry API and Accounts, tokens and authors.

Editors

  • Antril for VS Code: syntax highlighting, snippets, file icons and semantic colors for .ant files. It installs Larva with it.
  • Larva for VS Code runs larva lsp for every installed language. It gives errors as you type (borrow checker included), completion, hover, navigation into decompiled library types and .queen support. It adds the commands New Project from a Template, Run, Check, Build Native Executable, Build WebAssembly, Bind a Native Library, Generate Bindings from the Profile Open, List a Native Library's Exports, Show Type (decompiled) and Restart Language Server. See VS Code.
  • larva lsp works with any editor that speaks the Language Server Protocol. See The language server.

Install

File System
LarvaSetup-0.8.0-win-x64.exe Windows x64: the setup wizard, or --silent from a terminal.
Larva-0.8.0-win-x64.zip Windows x64, portable: unpack and run larva.exe. Nothing is added to PATH.
Larva-0.8.0-<os>-<arch>.tar.gz Linux x64 and macOS arm64: unpack and run install.sh.

Or in one line:

Terminal
irm https://www.antril.org/install.ps1 | iex
Terminal
curl -fsSL https://www.antril.org/install.sh | sh

Options pass through to install.sh, for example curl -fsSL https://www.antril.org/install.sh | sh -s -- --no-path.

  • The setup wizard installs into %LOCALAPPDATA%\Programs\Larva. It can add Larva to your PATH, register it in Settings > Apps, make https://www.antril.org/hive-api the default package registry and show Larva's files with their icons. Each of these can be turned off (--no-path, --no-registry, --no-hive, --no-types). --uninstall removes Larva.
  • install.sh installs into ~/.local/share/larva (on macOS, ~/Library/Application Support/Larva) and puts a larva command in ~/.local/bin. It takes --prefix, --no-path, --no-hive, --no-types and --uninstall.
  • On Windows, installing over an earlier version removes only the files that version installed. Anything else in the folder is left alone.
  • Optional tools: the MSVC build tools for native executables on Windows, clang for preprocessing C headers in larva bind, and Node.js for running WebAssembly builds outside a browser.

See Install Larva and The installers.

Known limitations

  • The Linux and macOS packages are new and less tested than the Windows installer. Please report problems on the forum.
  • Native executables are linked with the MSVC tools. Native builds on Linux and macOS are not finished yet.
  • gc: custom is accepted, but there is no interface for a project's own collector yet. Such projects are built with the tracing collector.
  • Larva's own WebAssembly back end (--target wasm) emits invalid modules for some programs and does not support 256-bit integers. Use --target wasm-llvm.
  • Main cannot receive text arguments, and Main() : i32 prints its result instead of exiting with it.
  • larva build compiles the whole program each time. A per-assembly incremental cache is planned.
  • Hive versions cannot be yanked on www.antril.org yet.

See What is not implemented yet.

Files and checksums

The files of this release are not published here.

Esc