Closed Michael-F-Bryan closed 4 years ago
In principle I agree, the only question I have is about licensing: the Etherlab code is GPL/LGPL. We are fine with MIT/Apache because we're not linking to anything, just using the ioctl interface to the kernel module. But distributing the code might be a problem (IANAL of course).
The other solution is to pre-generate the bindings, of course, but then we have to bless one of the codebases (there is the original Etherlab code, in Mercurial, with several branches, and there is a clone with patches at https://github.com/synapticon/Etherlab_EtherCAT_Master).
Maybe include pregenerated bindings with a feature flag (that is enabled for docs.rs)?
Do you think we could use build.rs
to do that? If ETHERCAT_PATH
is not set we clone the upstream code?
I think that's more than I would expect/want a build.rs
to do, at least without explicitly asking for it.
The other solution is to pre-generate the bindings,
that sounds good :)
of course, but then we have to bless one of the codebases (there is the original Etherlab code, in Mercurial, with several branches, and there is a clone with patches at https://github.com/synapticon/Etherlab_EtherCAT_Master).
We could pick two versions, one for the official and one for synapticon.
Maybe include pregenerated bindings with a feature flag (that is enabled for docs.rs)?
+1
... I'll try to add this to v0.2 (#28)
To make compiling
ethercat-sys
easier, is it possible to vendorhttp://hg.code.sf.net/p/etherlabmaster/code
as a git submodule?The idea being that
git clone ... && cargo build
workflow will Just Work, and it won't impact projects which transitively depend onethercat-sys
ethercat
's docs online (build logs)I know the original repository uses mercurial, but there seems to be a way to bridge
git
andmercurial
.When publishing to crates.io,
cargo
will just grab the files on disk and not go through git/mercurial. That means people using the published crate won't need to use tools likegit-hg
.