brainflow-dev / brainflow

BrainFlow is a library intended to obtain, parse and analyze EEG, EMG, ECG and other kinds of data from biosensors
https://brainflow.org/
MIT License
1.27k stars 327 forks source link

Upload brainflow rust bindings to crates.io #721

Open Pandapip1 opened 4 months ago

Pandapip1 commented 4 months ago

Use case:

I'd like to use brainflow in a rust project, and https://crates.io/ is the standard way of distributing Rust packages.

Describe the solution you'd like:

Brainflow should be uploaded to https://crates.io/

Describe alternatives you've considered:

N.A.

Andrey1994 commented 4 months ago

hi, there is one problem I cannot solve with crates. BrainFlow uses C\C++ dyn libs in all bindings and crates does not allow to package binary files properly, there is a strict limitation for max size of the package. idk how other projects bypass it

Pandapip1 commented 4 months ago

hi, there is one problem I cannot solve with crates. BrainFlow uses C\C++ dyn libs in all bindings and crates does not allow to package binary files properly, there is a strict limitation for max size of the package.

My understanding is that crates just assume that the user has the libraries installed somewhere in their LD_LIBRARY_PATH.

Andrey1994 commented 4 months ago

but in that case users still need to download libraries from somewhere and set LD_LIBRARY_PATH or PATH manually. Then advantage of using crates only for Rust code is debatable

Pandapip1 commented 4 months ago

but in that case users still need to download libraries from somewhere and set LD_LIBRARY_PATH or PATH manually. Then advantage of using crates only for Rust code is debatable

Not really. When you use your distro's package manager, they set LD_LIBRARY_PATH for you. So all you need to do is install the brainflow C library, then the crate. And even if you do all of the C library stuff manually, uploading it to crates.io makes depending on specific versions of the bindings that much easier.

retiutut commented 2 weeks ago

It does seem to be the official package distribution for Rust https://github.com/rust-lang/crates.io.