From 6acdbe4a874cf6fadc725c994252178b9b817c72 Mon Sep 17 00:00:00 2001 From: Yorick Peterse Date: Mon, 30 Oct 2023 17:35:56 +0100 Subject: [PATCH] Tweak the ivm installation guide It now mentions the AUR package (now that we've adopted it), and moves some other bits around. Changelog: other --- docs/source/getting-started/ivm.md | 55 ++++++++++++++++++++++-------- 1 file changed, 41 insertions(+), 14 deletions(-) diff --git a/docs/source/getting-started/ivm.md b/docs/source/getting-started/ivm.md index 61fb327cd..f15b17a7a 100644 --- a/docs/source/getting-started/ivm.md +++ b/docs/source/getting-started/ivm.md @@ -10,34 +10,44 @@ ivm itself only requires Rust 1.68 or newer, but to build Inko itself you'll need to also meet the requirements listed in the [installation guide](installation.md). -### From source +### Linux -Clone the repository: +#### Arch Linux + +ivm can be installed using the AUR using an AUR wrapper of your choice. For +example, using [yay](https://github.com/Jguer/yay): ```bash -git clone https://github.com/inko-lang/ivm.git +yay -S ivm +``` + +Or manually: + +```bash +git clone https://aur.archlinux.org/ivm.git cd ivm -cargo build --release +makepkg -si ``` -The resulting executable is found in `target/release/ivm`. +### From source -If you are building a package of ivm, you can use the provided `Makefile` -instead of `cargo build`: +Clone the repository: ```bash -make -make install +git clone https://github.com/inko-lang/ivm.git +cd ivm +cargo build --release ``` -This process can be customised by setting the following Make variables: - -- `DESTDIR`: the directory to install files into when running `make install`. -- `PREFIX`: the path prefix to use for all files, defaults to `/usr`. When - combined with `DESTDIR`, the value of `DESTDIR` prefixes this value. +The resulting executable is found in `target/release/ivm`. ### Using crates.io +!!! note + If a package is available for your platform, we recommend installing ivm + through your platform's package manager instead. Once ivm is available on + enough platforms, we may stop publishing it to crates.io. + ivm is available on [crates.io](https://crates.io/), and you can install it as follows: @@ -150,3 +160,20 @@ The `default` command is used to set a default Inko version to use. When set, ivm will create a symbolic link in its `bin/` directory to the `inko` executable of the default version. By setting a default version you can just use `inko ...` instead of the much more verbose `ivm run VERSION inko ...`. + +## Packaging ivm + +If you are building a package of ivm (e.g. for Debian), you can use the provided +`Makefile` instead of `cargo build`: + +```bash +make +make install +``` + +This process can be customised by setting the following Make variables: + +- `DESTDIR`: the directory to install files into when running `make install`. +- `PREFIX`: the path prefix to use for all files, defaults to `/usr`. When + combined with `DESTDIR`, the value of `DESTDIR` prefixes this value. +