Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
FROM debian:bookworm-slim AS chef
WORKDIR /app
RUN apt-get update && \
apt-get install -y --no-install-recommends build-essential=12.9 ca-certificates=20230311+deb12u1 curl=7.88.1-10+deb12u15 && \
apt-get install -y --no-install-recommends \
build-essential=12.9 \
ca-certificates=20230311+deb12u1 \
curl=7.88.1-10+deb12u15 && \
zlib1g=1.2.13.dfsg-1 \
rm -rf /var/lib/apt/lists/*

COPY scripts/ scripts/
Expand Down
2 changes: 1 addition & 1 deletion aur/PKGBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ pkgdesc='Visualize Ownership and Lifetimes in Rust'
url='https://github.com/cordx56/rustowl'
license=('MPL-2.0')
makedepends=('clang' 'make' 'autoconf' 'cmake' 'curl')
depends=()
depends=('zlib')
conflicts=('rustowl-git' 'rustowl-bin')
arch=('any')
source=("https://github.com/cordx56/rustowl/archive/refs/tags/v${pkgver}.tar.gz")
Expand Down
2 changes: 1 addition & 1 deletion aur/PKGBUILD-BIN
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ pkgdesc='Visualize Ownership and Lifetimes in Rust'
url='https://github.com/cordx56/rustowl'
license=('MPL-2.0')
makedepends=()
depends=()
depends=('zlib')
conflicts=('rustowl-git' 'rustowl')
arch=('x86_64' 'aarch64')
source_aarch64=("https://github.com/cordx56/rustowl/releases/download/v${pkgver}/rustowl-aarch64-unknown-linux-gnu.tar.gz")
Expand Down
1 change: 1 addition & 0 deletions aur/PKGBUILD-GIT
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ pkgdesc='Visualize Ownership and Lifetimes in Rust'
url='https://github.com/cordx56/rustowl'
license=('MPL-2.0')
makedepends=('git' 'clang' 'make' 'autoconf' 'cmake' 'curl')
depends=('zlib')
arch=('any')
source=("git+https://github.com/cordx56/rustowl.git")
sha256sums=('SKIP')
Expand Down
59 changes: 59 additions & 0 deletions docs/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@
- [Installation](#installation)
- [Table Of Contents](#table-of-contents)
- [Quick Start](#quick-start)
- [Runtime dependencies](#runtime-dependencies)
- [Windows](#windows)
- [Linux](#linux)
- [macOS](#macos)
- [cargo-binstall (recommended)](#cargo-binstall)
- [Windows (winget)](#windows-winget)
- [Arch Linux (AUR)](#arch-linux-aur)
Expand All @@ -23,6 +27,61 @@
curl -L https://raw.githubusercontent.com/cordx56/rustowl/refs/heads/main/scripts/installer | sh
```

## Runtime dependencies

RustOwl ships two executables:

- `rustowl` is the LSP server that editor extensions talk to.
- `rustowlc` is the Rust compiler that performs the analysis.

Those prebuilt compiler binaries are dynamically linked against a few system
libraries that are not bundled, so they must be present on the machine that runs
RustOwl. This is a runtime requirement only — building RustOwl from source does
not need them.

They might be already available, given their amount of usage in the wild.

### Windows

The prebuilt compiler binaries are built with the MSVC toolchain, so they require
the Microsoft Visual C++ 2015-2022 Redistributable (x64). It is probably already installed
on your machine. If not, you can install it with winget:

```sh
winget install Microsoft.VCRedist.2015+.x64
```

You can also download the installer directly from
<https://aka.ms/vs/17/release/vc_redist.x64.exe>.

Without it, launching RustOwl fails immediately with:

```
The code execution cannot proceed because VCRedist140_1.dll was not found.
```

### Linux

The prebuilt `libLLVM` shipped by the Rust project has a system dependency on the
zlib shared library (`libz.so.1`). It is probably already installed on your machin. If not, install it with your package manager:

| Distribution | Command |
| --- | --- |
| Debian, Ubuntu | `sudo apt-get install -y zlib1g` |
| Fedora, RHEL | `sudo dnf install -y zlib` |
| Arch Linux | `sudo pacman -S zlib` (already in `base`) |
| Alpine | `sudo apk add zlib` |

Without it, RustOwl fails immediately with:

```
rustowlc: error while loading shared libraries: libz.so.1: cannot open shared object file: No such file or directory
```

### macOS

Nothing is needed.

## cargo-binstall

Install the prebuilt binary using cargo-binstall:
Expand Down
Loading