- Larva
- Getting started
- Install Larva
Install Larva
Install the larva toolchain on Windows, Linux or macOS, check it, and set up VS Code for Antril.
On this page
Antril programs are built with Larva, a toolchain behind a single command: larva. Installing Larva gives you the compiler for .ant files, the standard library (System.Core), the project templates and the Hive package manager.
Get the installer for your system from the download page.
Windows
The setup wizard
Run LarvaSetup-<version>-win-x64.exe. It installs for the current user, so it does not need administrator rights. The wizard asks for:
- the destination folder (by default
%LOCALAPPDATA%\Programs\Larva); - whether to add that folder to your user
PATH, solarvaruns from any terminal; - whether to register Larva in Settings > Apps, with its uninstaller;
- whether to use
https://www.antril.org/hive-apias the default package registry; - whether to show Larva's files (
.lva,.lvo,.queen,.hive, source files) with their icons.
Before installing, it also checks for the optional tools listed below.
Without the wizard
The same program installs from a terminal:
LarvaSetup-0.8.0-win-x64.exe --silent
| Option | What it does |
|---|---|
--silent |
Installs without questions, printing what it does. |
--dir <folder> |
Installs into <folder> instead of %LOCALAPPDATA%\Programs\Larva. |
--no-path |
Does not add the folder to your PATH. |
--no-registry |
Does not register Larva in Settings > Apps. |
--no-hive |
Does not make www.antril.org/hive-api the default package registry. |
--no-types |
Does not register Larva's file types and icons. |
--uninstall |
Removes Larva (add --silent to skip the confirmation). |
--help |
Lists the options. |
You can also uninstall from Settings > Apps.
The zip
Larva-<version>-win-x64.zip holds the same files. Unpack it anywhere and run larva.exe from there. Nothing is added to PATH or to Settings > Apps.
Linux and macOS
Note
The Linux and macOS packages are new in this release. They are tested less than the Windows installer; please report anything that goes wrong.
Download Larva-<version>-linux-x64.tar.gz (or the macOS archive), unpack it and run install.sh:
tar -xzf Larva-0.8.0-linux-x64.tar.gz
cd Larva-0.8.0-linux-x64
./install.sh
The script installs for the current user, without root. It copies Larva into ~/.local/share/larva (on macOS, ~/Library/Application Support/Larva) and puts a larva command in ~/.local/bin.
| Option | What it does |
|---|---|
--prefix <folder> |
Installs into <folder>. |
--no-path |
Does not add ~/.local/bin to the PATH of new shells. |
--no-hive |
Does not make www.antril.org/hive-api the default package registry. |
--no-types |
Does not register Larva's file types and icons. |
--uninstall |
Removes what the script installed (with --prefix if you used one). |
--help |
Lists the options. |
What gets installed
| File | What it is |
|---|---|
larva (larva.exe) |
The toolchain: build, run, projects, packages, bindings, the language server. |
System.Core.dll |
The standard library, compiled. Programs are built against it. |
System.Bindings.dll |
What binding profiles are written against (see Native bindings). |
Languages/ |
The languages larva compiles, one folder each. Antril is in Languages/Antril. |
Templates/ |
The project templates of larva new. |
icons/ |
The icons of Larva's file types. |
LLVM-C.dll, libLLVMSharp.dll |
The code generator larva uses. |
Check the installation from a new terminal:
larva --version
larva 0.8.0
larva languages
Antril 0.8.0 (antril: .ant)
Antril for Larva: its frontend (Antril source to Larva HIR), its view (HIR written as Antril) and its editor services
author: Antril Organization
license: Proprietary
homepage: https://antril.org
folder: C:\Users\you\AppData\Local\Programs\Larva\Languages\Antril
signature: signed, key c8794c3d0dd4d1fc
status: ok (files verified)
Uninstall
Each installer also removes Larva:
LarvaSetup-0.8.0-win-x64.exe --uninstall
./install.sh --uninstall
./install.sh --uninstall
Run install.sh with the same --prefix as when you installed, if you used one.
Optional tools
Larva works without anything else for checking code and building libraries. Some builds use tools from your system:
| Tool | Needed for |
|---|---|
| MSVC build tools (Windows: Visual Studio Build Tools with the C++ workload) | Native executables (larva build, larva run). |
A C compiler, cc (Linux, macOS) |
Linking native executables, once native builds on Linux and macOS are finished: today larva build links with the MSVC tools only (see Native builds). |
| clang | Reading C headers with the preprocessor in larva bind. Without it, headers are read as they are. |
| Node.js | Running WebAssembly builds outside a browser (node app.js). |
VS Code
Two extensions add Larva and Antril to VS Code. Install Antril; it brings Larva with it.
- Larva runs the language server (
larva lsp) for every language Larva has installed. It understands.queenproject files and adds 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. Iflarvais not on yourPATH, setlarva.pathin the settings. - Antril is the language itself: syntax highlighting, snippets, file icons and semantic colors for
.antfiles. Errors as you type, completion and navigation come from the Larva extension.
Next: write your first program.
Edit this page on GitHub Report an issue