8 unstable releases (3 breaking)

0.4.0 Oct 10, 2020
0.3.1 Sep 5, 2020
0.3.0 Jul 26, 2020
0.2.3 Jul 19, 2020
0.1.0 Feb 1, 2019

#293 in Configuration

Download history 13/week @ 2023-08-13 85/week @ 2023-08-20 62/week @ 2023-08-27 5/week @ 2023-09-03 13/week @ 2023-09-10 11/week @ 2023-09-17 5/week @ 2023-09-24 5/week @ 2023-10-01 3/week @ 2023-10-08 5/week @ 2023-10-15 7/week @ 2023-10-22 15/week @ 2023-10-29 6/week @ 2023-11-05 18/week @ 2023-11-12 7/week @ 2023-11-19 29/week @ 2023-11-26

61 downloads per month

MIT license


Build Status Docs License: MIT


Weechat is an extensible chat client.

Rust-Weechat is a high level Rust library providing an API for building Weechat plugins.

It wraps the Weechat C plugin API as safe Rust bindings.

Project Status

This project is in a decently stable state, many things that the Weechat plugin API allows are exposed in a higher level safe API. Many things still need to be figured out and exposed safely. Breaking changes might still get introduced.

Experimental or unsound features are gated behind feature flags.


Example plugins can be found in the examples part of the repository.

The following example shows a minimal working Rust plugin.

use weechat::{
    weechat_plugin, Args, Weechat, Plugin,

struct HelloWorld;

impl Plugin for HelloWorld {
    fn init(_: &Weechat, _: Args) -> Result<Self, ()> {
        Weechat::print("Hello from Rust");

impl Drop for HelloWorld {
    fn drop(&mut self) {
        Weechat::print("Bye from Rust");

    name: "hello",
    author: "Damir Jelić <poljar@termina.org.uk>",
    description: "Simple hello world Rust plugin",
    version: "1.0.0",
    license: "MIT"

Projects build with Rust-Weechat

Are we missing a project? Submit a pull request and we'll get you added! Just edit this README.md file.

Picking the correct Weechat version.

By default the system-wide weechat-plugin.h file will be used if found, this behaviour can be overridden with two environment flags.

To prefer a bundled include file WEECHAT_BUNDLED should be set to true. The bundled include file tracks the latest Weechat release.

A custom include file can be set with the WEECHAT_PLUGIN_FILE environment variable, this environment variable takes a full path to the include file.


~74K SLoC