# Installation instruction

**Currently supported plateforms** : linux, macos and redox.
Windows is not supported.

**Needed dependencides for Linux** : libudev-dev

You can install it through (ubuntu, debian and other distributions using the apt package manager) :

```
sudo apt-get install libudev-dev
```

## Install from crates.io

If you have a rust toolchain installed you simply have to run :

```
cargo install herkulex_communicator
```

Otherwise you can follow an other installation method or [install a rust toolchain](https://rustup.rs/).

## [Download the latest binary from the release page](https://git.florencepaul.com/gbip/herkulex_manager/releases)

## Build from source

You have clone the repository and build the application using:

```
cargo build
```

# Install completion

Once you have installed `herkulex_communicator` you can generate completion files for your favorite sheel. Currently only `bash`, `zsh` and `fish` are supported.

Note: you may need to restart your shell in order for the changes to take effect.

### Bash
```
herkulex_communicator completions bash > /etc/bash_completion.d/herkulex_communicator.bash-completion
```

### Bash (macOS/Homebrew)
```
herkulex_communicator completions bash > $(brew --prefix)/etc/bash_completion.d/herkulex_communicator.bash-completion
```

### Fish
```
herkulex_communicator completions fish > ~/.config/fish/completions/herkulex_communicator.fish
```

### Zsh
```
herkulex_communicator completions zsh > ~/.zfunc/_herkulex_communicator
```
Then, you must then add the following line in your ~/.zshrc before compinit:

```
fpath+=~/.zfunc
```
