linuxcnc-hal-sys 0.1.5

Generated, unsafe Rust bindings to the LinuxCNC HAL submodule
Documentation

LinuxCNC HAL Rust bindings

CircleCI Crates.io Docs.rs

Provides non-realtime Rust bindings for the LinuxCNC hal module. Useful for writing drivers for external hardware.

Note: This only works on Linux (64 bit) currently

Development

Setup

bindgen must be set up correctly. Follow the requirements section of its docs.

LinuxCNC is included as a submodule under ./linuxcnc-hal-sys. It must be compiled for files to be in the right places.

At minimum (on Linux Mint 19.3):

apt install \
    bwidget \
    intltool \
    kmod \
    libboost-python-dev \
    libglu-dev \
    libgtk2.0-dev \
    libmodbus-dev \
    libtk-img \
    libudev-dev \
    libusb-1.0-0-dev \
    libx11-dev \
    libxinerama-dev \
    libxmu-dev \
    mesa-common-dev \
    python \
    python-tk \
    tclx \
    tk-dev \
    yapps2

cd linuxcnc/src

./autogen.sh

./configure \
  --with-realtime=uspace \
  --enable-non-distributable=yes \
  --disable-userspace-pci \
  --disable-check-runtime-deps

make -j $(nproc)

There are likely a bunch of unused dependencies in the above list, but LinuxCNC's configure script is really bad at turning features on/off, so this is the list required to just build LCNC.

Build

cargo build