Skip to content

Commit

Permalink
Tweak the ivm installation guide
Browse files Browse the repository at this point in the history
It now mentions the AUR package (now that we've adopted it), and moves
some other bits around.

Changelog: other
  • Loading branch information
yorickpeterse committed Oct 30, 2023
1 parent 772d224 commit 6acdbe4
Showing 1 changed file with 41 additions and 14 deletions.
55 changes: 41 additions & 14 deletions docs/source/getting-started/ivm.md
Expand Up @@ -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:

Expand Down Expand Up @@ -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.

0 comments on commit 6acdbe4

Please sign in to comment.