#ethercat #binding #etherlab #master

sys ethercat-sys

Binding to the Etherlab open-source EtherCAT master

7 releases

0.3.1 Oct 14, 2023
0.3.0 Apr 5, 2023
0.2.0 Nov 3, 2020
0.1.3 Oct 12, 2019
0.1.0 Mar 1, 2019

#473 in Unix APIs

Download history 4/week @ 2024-02-05 16/week @ 2024-02-12 14/week @ 2024-02-19 59/week @ 2024-02-26 10/week @ 2024-03-04 37/week @ 2024-03-11 52/week @ 2024-04-01 16/week @ 2024-04-08 3/week @ 2024-04-15

71 downloads per month
Used in 2 crates (via ethercat)



The ethercat crate

Apache 2.0 licensed MIT licensed crates.io docs



The ethercat crate provides a Rust wrapper for the IgH/Etherlab EtherCAT Master for Linux.

EtherCAT is an Ethernet-based fieldbus system, originally invented by Beckhoff GmbH but now used by numerous providers of automation related hardware. The IgH master lets you provide an EtherCAT master on a Linux machine without specialized hardware.


In order to build the raw wrapper crate ethercat-sys, you need to set the environment variable ETHERCAT_PATH to the location of a checkout of the IgH Etherlab repository, after running configure there.

The IgH repository is located at https://gitlab.com/etherlab.org/ethercat. Please switch to the stable-1.5 branch in the checkout.

Bindings have been pregenerated for revision c022ddbcf254 - if you activate the feature pregenerated-bindings, you don't need the master code to build, but the kernel modules must match that revision.

The minimum tested Rust version is 1.63.0.


The Etherlab master provides Linux kernel modules under GPLv2 with an ioctl based interface, and a userspace library under LGPLv2.1. This crate does not use the userspace library (which is mostly a simple wrapper around the ioctls anyway) but rather communicates with the kernel modules through the raw ioctls.

Therefore, we believe that the crate does not need to be GPLv2-licensed, and are using the dual MIT/Apache-2 license commonly used for Rust crates.


~37K SLoC