jguhlin / minimap2-rs

Rust bindings to minimap2 library
Other
60 stars 13 forks source link

FEATURE: Remove bindgen requirement from regular builds #9

Closed jguhlin closed 1 year ago

jguhlin commented 1 year ago

This would fix #8.

jianshu93 commented 1 year ago

Hello,

I am wondering how exactly you remove the dependency on libclang? We have another binding called hmmer-rs but relies on libclang.

Thanks,

Jianshu

jguhlin commented 1 year ago

@jianshu93 Hey, apologies for the delay. To remove libclang you need to copy the compiled bindings.rs into the src folder, and use that unless a bindgen feature flag is enabled.

See here: https://github.com/jguhlin/minimap2-rs/blob/main/minimap2-sys/src/lib.rs#L5

Make bindgen optional and a feature flag: https://github.com/jguhlin/minimap2-rs/blob/main/minimap2-sys/Cargo.toml#L42

And the same in your build.rs script.

https://github.com/jguhlin/minimap2-rs/blob/main/minimap2-sys/build.rs#L181

And that should handle it.

jianshu93 commented 1 year ago

Thanks!

I will try and let you know.

Thanks

Jianshu