Replacement for the `bindgen` build dependency #56
Comments
|
Hello, i think it's possible to use a static, portable (but manually implemented) binding that would fullfill point from 2 to 5. Let me explain:
I see 2 issues for this solution:
What do you think, is it worth to try it ? (1): for enum, due to certain limitation, it's frequent to map each variant of the C enum to a Rust constant. I checked the C enum reference an those variant should be mapped to a c int type. The sign issue with bindgen doesn't matter here because we aren't supposed to do arithmetics with an enum. |
|
What you're suggesting is to do the the job of One of my fears of using a static Pre-generated or manually implemented bindings, however, might be wrong for some targets and since we don't know all of these targets well, we'll have a hard time figuring out what is wrong. I can't imagine what would happen if we mess up a function pointer signature! Therefore, if you want to try this path, I would suggest to create some sort of test that uses |
Thing have changed here, last time i looked the lv2-sys source (through the doc), it wasn't formatted and all was on the same line.
That how i tried, but i got completly bored around 25% because, except for uri string, i was always checking if bindgen was generating same thing i will do. And except for enum, it do the same. I also played a lot with bindgen and discovered many thing:
So i give up the idea of manual binding, but i keep the idea of a static binding. I think we can assume binding compatibility between target using 32 bit enum and generate the same static binding for all of them. For other target, i think it's possible to use |
|
Go forth, I'm looking forward to your pull request! |

Formed in 2009, the Archive Team (not to be confused with the archive.org Archive-It Team) is a rogue archivist collective dedicated to saving copies of rapidly dying or deleted websites for the sake of history and digital heritage. The group is 100% composed of volunteers and interested parties, and has expanded into a large amount of related projects for saving online and digital history.

The
lv2-syscrate currently usesbindgenin it's build script to generate the bindings to the LV2 API headers. The main reason for that is that this always produces bindings that work on your local platform, without the need to maintain a different version of the same crate for every platform.On the downside, building
bindgenitself and generating the bindings takes a lot of time, about half a minute for even the simplest plugins, and requires clang to be properly installed. Especially the last point raises problems, for example because development setups on Windows are always quite tricky.Therefore, I request an alternative solution that is faster, doesn't rely on clang, and is easy to maintain. The precise requirements are:
These requirements were developed in the discussion issue #55. Please take a look at it for more context.
The text was updated successfully, but these errors were encountered: