---
name: "rusty-tags"
section: "1"
platform: "linux"
package: "rusty-tags"
version: "3.10.0-1+b7"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/rusty-tags"
---

# rusty-tags(1)

creates ctags/etags for a cargo project

## NAME

rusty-tags - creates ctags/etags for a cargo project

## SYNOPSIS

**rusty-tags** \[*options*\] *tags\_kind*

## DESCRIPTION

**rusty-tags** creates tags for source code navigation using ctags for a [**cargo**(1)](/cargo/1.md) project, all of its direct and indirect dependencies and the Rust standard library. It can be run anywhere inside a cargo project. **rusty-tags** creates a rusty-tags.vi (if *tags\_kind* is **vi**) or a rusty-tags.emacs file (if *tags\_kind* is **emacs**) beside the Cargo.toml file. Tags are also generated for every dependency. If a dependency reexports parts of its own dependencies, then these reexported parts are also contained in the tags file of the dependency.

Tags for the standard library are created if the path to the Rust source is supplied by defining the environment variable **RUST\_SRC\_PATH**.

## OPTIONS

- **-f**, **--force-recreate**

  Forces the recreation of the tags of all dependencies and the Rust standard library.

- **-h**, **--help**

  Prints help information.

- **-n**, **--num-threads=***num*

  Set the number of threads used for the tags creation (default: number of available physical cpus).

- **-o**, **--omit-deps**

  Do not generate tags for dependencies.

- **-O**, **--output=***filename*

  Set the name of the output tags file (default: rusty-tags.vi if *tags\_kind* is **vi** or rusty-tags.emacs if *tags\_kind* is **emacs**).

- **-q**, **--quiet**

  Do not output anything but errors.

- **-s**, **--start-dir=***dir*

  Set the start directory for the search of the Cargo.toml file (default: current working directory).

- **-V**, **--version**

  Prints version information.

- **-v**, **--verbose**

  Enable verbose output about all operations.

## CONFIGURATION

### rusty-tags configuration

**rusty-tags** reads the configuration file ~/.rusty-tags/config.toml.  It supports these settings:

- **vi\_tags**

  The file name used for vi tags (default: rusty-tags.vi).

- **emacs\_tags**

  The file name used for emacs tags (default: rusty-tags.emacs).

- **ctags\_exe**

  The name or path to the [**ctags**(1)](/ctags/1.md) executable (default: ctags, exuberant-ctags, exctags, universal-ctags, uctags are tried in that order).

- **ctags\_options**

  The options given to the [**ctags**(1)](/ctags/1.md) executable (default: none).

### vim configuration

To use the generated tag files with vim, add the following to your vimrc file:\
     autocmd BufRead \*.rs :setlocal tags=./rusty-tags.vi;/\
     autocmd BufWritePost \*.rs :silent! exec "!rusty-tags vi --quiet --start-dir=" . expand('%:p:h') . "&" \| redraw!

The first line ensures that vim will automatically search for a rusty-tags.vi file upwards the directory hierarchy. This setting is important if you want to jump to dependencies and the further jump to their dependencies.

The second line ensures that your project's tag file gets updated if a file is written.

If you have set the path to the Rust source code in the **RUST\_SRC\_PATH** environment variable, use this setting instead:\
     autocmd BufRead \*.rs :setlocal tags=./rusty-tags.vi;/,$RUST\_SRC\_PATH/rusty-tags.vi

## ENVIRONMENT

- **RUST\_SRC\_PATH**

  The path to the source code of the Rust standard library to generate tags for.

## FILES

- **~/.rusty-tags/config.toml**

  The configuration file for **rusty-tags** (see the **Configuration** section).

## SEE ALSO

[**ctags**(1)](/ctags/1.md)
