A elegant and modern systems programming language
Multiple installation methods are available. Choose the one that works best for your system.
There are plans to implement native installers for more distributions and platforms in the near future!
The easiest way to install on Arch Linux:
yay -S lotus-lang
git clone https://aur.archlinux.org/lotus-lang.git cd lotus-lang makepkg -si
Visit the AUR Package Page
Build Lotus from source using Go 1.20 or later:
git clone https://github.com/j-alexander3375/Lotus.git cd Lotus go build -o lotus ./src
# Optionally copy to a system path sudo cp lotus /usr/local/bin/ # Or add current directory to PATH export PATH=$PATH:$(pwd)
lotus --version
For other Linux distributions, build from source:
Debian/Ubuntu:
sudo apt install golang-go llvm-dev gcc git
Fedora/RHEL:
sudo dnf install golang llvm-devel gcc git
openSUSE:
sudo zypper install go llvm-devel gcc git
Then follow the "Build Steps" above.
Install Lotus on macOS using Homebrew or from source:
brew tap j-alexander3375/lotus brew install lotus-lang
# Install dependencies brew install go llvm gcc # Clone and build git clone https://github.com/j-alexander3375/Lotus.git cd Lotus go build -o lotus ./src # Install sudo cp lotus /usr/local/bin/
Lotus can be built on Windows using WSL2 or MSYS2:
Install Windows Subsystem for Linux 2 and use the Linux instructions above.
pacman -S mingw-w64-x86_64-go mingw-w64-x86_64-llvm mingw-w64-x86_64-gcc git git clone https://github.com/j-alexander3375/Lotus.git cd Lotus go build -o lotus.exe ./src
Test your installation:
lotus --version
Create hello.lts:
use "io";
fn int main() {
println("Hello from Lotus!");
ret 0;
}
Compile and run:
lotus -run hello.lts
You should see: Hello from Lotus!
Make sure the lotus binary is in your PATH:
which lotus # or type lotus
If not found, add the directory containing lotus to your PATH or use the full path to the binary.
Install GCC for your system:
# Linux sudo apt install gcc # Debian/Ubuntu sudo dnf install gcc # Fedora # macOS brew install gcc
Install Go 1.20 or later from golang.org
Use sudo when copying to system paths:
sudo cp lotus /usr/local/bin/