Commit 35e12f8bfa

35e12f8bfa6d63bb388ac1981636b67c0bc655fd

parent: 970a498263

Unsigned

Darafei Praliaskouski <me@komzpa.net> · 2026-06-23 13:44 UTC
committer: <strk@kbt.io>

docs: clarify build and install prerequisites

Layout: unified · split

README.md +41 −8
@@ -22,21 +22,54 @@ If you are interested in helping out take a look at the issue tracker.
22 22
23# Build 23# Build
24 24
25After Rust is installed the plugin can be compiled with: 25Install Rust and the native build dependencies first. On Debian or Ubuntu a
26typical build environment needs:
27
28 sudo apt install build-essential clang libclang-dev libsqlite3-dev pkg-config
29
30Other distributions use different package names, but the important native
31pieces are a C/C++ compiler, `clang`/`libclang`, and SQLite development headers.
32The `weechat-sys` dependency has a bundled WeeChat plugin header
33(`weechat-plugin.h`) fallback. If you want to build against the exact WeeChat
34API installed on your system, install the matching development package
35(`weechat-dev` on Debian/Ubuntu) or point `WEECHAT_PLUGIN_FILE` at the full
36path to that header:
37
38 export WEECHAT_PLUGIN_FILE=/usr/include/weechat/weechat-plugin.h
39
40After the dependencies are installed the plugin can be compiled with:
26 41
27 cargo build --release 42 cargo build --release
28 43
29If you are developing on weechat-matrix-rs, use debug builds which are faster at the expense of plugin performance: 44If you are developing on weechat-matrix-rs, use debug builds which are faster at
45the expense of plugin performance:
30 46
31 cargo build 47 cargo build
32 48
33On Linux this creates a `libmatrix.so` file in the `target/release/` (`target/debug` for dev builds) folder, this 49On Linux this creates a `libmatrix.so` file in the `target/release/`
34file needs to be renamed to `matrix.so` and copied to your Weechat plugin 50(`target/debug` for dev builds) folder. Rename it to `matrix.so` and copy it to
35directory. A plugin directory can be created in your `$WEECHAT_HOME` folder, by 51your WeeChat plugin directory.
36default `.weechat/plugins/`. 52
53`make install` uses WeeChat's XDG data directory by default:
54
55 make install
56
57This installs the release build to:
58
59 ${XDG_DATA_HOME:-$HOME/.local/share}/weechat/plugins/matrix.so
60
61Use `PROFILE=debug` for a debug build:
62
63 make install PROFILE=debug
64
65On older WeeChat setups the plugin directory may instead live under
66`$WEECHAT_HOME/plugins`, commonly `~/.weechat/plugins/`. Create the directory if
67needed and copy the renamed plugin there.
68
69On macOS the built library extension is usually `.dylib`. WeeChat may need this
70extension enabled before it loads the plugin:
37 71
38Alternatively, `make install` (`make install PROFILE=debug` for dev build) will build and install the plugin in your 72 /set weechat.plugin.extension ".so,.dll,.dylib"
39`$WEECHAT_HOME` as well.
40 73
41# Configuration 74# Configuration
42 75