# Rust

Source: https://libtmux.org/en/rs/latest/

> libtmux for Rust, version latest.

![](https://libtmux.org/en/brand/rust/library/logo.svg)

Drive a real tmux from Rust.

libtmux

You are reading the **latest** documentation. Use the version control in the header to move between releases, or the port dropdown to find a corresponding page in another language.

## Install

### Library `libtmux`

```console
$ cargo add libtmux
```

### [Workspace Manager](https://libtmux.org/en/rs/latest/workspace/) `tmux-workspace`

The workspace package is separate from the core library.

```console
$ cargo install --locked --version 0.1.0-alpha.15 tmux-workspace
```

Needs Rust 1.85 or newer. cargo install skips prereleases unless asked, so the command names the version. This builds and installs the native CLI; run tmux-workspace --help afterward.

### [MCP](https://libtmux.org/en/rs/latest/mcp/) `tmux-mcp`

Choose your client and configuration scope, then run the command or paste the configuration.

Build or install the server first:

```console
$ cargo install tmux-mcp --version 0.1.0-alpha.13
```

Then register:

```console
$ claude mcp add tmux -- tmux-mcp
```

Cargo requires an explicit prerelease version. The installed \`tmux-mcp\` binary speaks MCP on stdin and stdout.

Config file: `~/.claude.json (this project)`

### [Topics](https://libtmux.org/en/rs/latest/topics/)

[Subject-by-subject, with Rust in every code block.](https://libtmux.org/en/rs/latest/topics/)

### [Guides](https://libtmux.org/en/rs/latest/guides/)

[Task guides for Rust.](https://libtmux.org/en/rs/latest/guides/)

### [Examples](https://libtmux.org/en/rs/latest/examples/)

[Complete programs, sourced from the code each port tests.](https://libtmux.org/en/rs/latest/examples/)

### [Concepts](https://libtmux.org/en/rs/latest/concepts/)

[The domain model every port shares.](https://libtmux.org/en/rs/latest/concepts/)

## Packages and integrations

### [Workspace Manager](https://libtmux.org/en/rs/latest/workspace/)

[Load workspace files with the tmux-workspace load prerelease.](https://libtmux.org/en/rs/latest/workspace/)

### [MCP](https://libtmux.org/en/rs/latest/mcp/)

[In development. Connect an MCP client to tmux tools and inspect the server API.](https://libtmux.org/en/rs/latest/mcp/)

## API references

### [Official reference](https://libtmux.org/en/rs/latest/reference/)

[Rust API signatures and documentation, with links to related guides and APIs in other languages.](https://libtmux.org/en/rs/latest/reference/)

### [docs.rs documentation](https://docs.rs/libtmux)

[Rust API documentation for published crate versions on docs.rs.](https://docs.rs/libtmux)

[All Rust versions and install instructions](https://libtmux.org/en/rs/)
