From 24983af6e85c6940973036f725c4f8a72bb383ea Mon Sep 17 00:00:00 2001 From: Muntasir Mahmud Date: Mon, 5 Oct 2026 17:22:03 +0600 Subject: [PATCH 1/2] refactor: add notes about runtime deps and add to packages Signed-off-by: Muntasir Mahmud --- Dockerfile | 6 ++++- aur/PKGBUILD | 2 +- aur/PKGBUILD-BIN | 2 +- aur/PKGBUILD-GIT | 1 + docs/installation.md | 57 ++++++++++++++++++++++++++++++++++++++++++++ 5 files changed, 65 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index 5bfbcc7c..8cbf2c47 100644 --- a/Dockerfile +++ b/Dockerfile @@ -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/ diff --git a/aur/PKGBUILD b/aur/PKGBUILD index 14fd62a9..46a25ef1 100644 --- a/aur/PKGBUILD +++ b/aur/PKGBUILD @@ -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") diff --git a/aur/PKGBUILD-BIN b/aur/PKGBUILD-BIN index 66a762ae..3782318d 100644 --- a/aur/PKGBUILD-BIN +++ b/aur/PKGBUILD-BIN @@ -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") diff --git a/aur/PKGBUILD-GIT b/aur/PKGBUILD-GIT index 8d4ebb03..4f52e000 100644 --- a/aur/PKGBUILD-GIT +++ b/aur/PKGBUILD-GIT @@ -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') diff --git a/docs/installation.md b/docs/installation.md index 49d25afc..95dcb1f1 100644 --- a/docs/installation.md +++ b/docs/installation.md @@ -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) @@ -23,6 +27,59 @@ 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. + +### 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 +. + +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`). 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: From 3ad11209c6b4b253c16d2ccf1f174debbf550c49 Mon Sep 17 00:00:00 2001 From: Muntasir Mahmud Date: Fri, 9 Oct 2026 05:27:37 +0600 Subject: [PATCH 2/2] docs: change wording to note runtime deps might be already available --- docs/installation.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/docs/installation.md b/docs/installation.md index 95dcb1f1..d43f47f2 100644 --- a/docs/installation.md +++ b/docs/installation.md @@ -39,6 +39,8 @@ 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 @@ -61,7 +63,7 @@ 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`). Install it with your package manager: +zlib shared library (`libz.so.1`). It is probably already installed on your machin. If not, install it with your package manager: | Distribution | Command | | --- | --- |