For development environments install libmodbus system wide.
cd
git clone https://github.com/stephane/libmodbus.git
cd libmodbus
./autogen.sh
./configure --prefix=/usr --disable-tests
make -j3 && make installTo build the documentation for the 3.1.4 branch you have to install asciidoc and xmlto.
For arch install them via:
pacman -S asciidoc xmltocd
git clone https://github.com/zzeroo/libmodbus-rs.git
cd libmodbus-rs
cargo run --example master -- /dev/ttyUSB0 1