Skip to content

Conversation

kornelski
Copy link
Contributor

@kornelski kornelski commented Aug 7, 2019

Pulling in llvm is quite slow, and very problematic in many environments, so I've made runtime bindgen behind a feature flag.

@kornelski
Copy link
Contributor Author

This may fix #109

@kornelski kornelski changed the base branch from sys-bindgen to master August 10, 2019 00:02
@iwillspeak
Copy link
Collaborator

Thanks. I like the idea but i'd prefer this to be opt out rather than opt in for bindgen. I think we should be using environment variables for this too rather than Cargo features. It seems more of a built time problem rather than some configuration with extra features you enable.

While I do like the upgrade to Rust 2018 could you move that part to a separate PR.

Thanks again for the contribution.

@kornelski
Copy link
Contributor Author

kornelski commented Aug 12, 2019

The main reason to avoid bindgen is the heavy libclang/llvm dependency. It makes it harder to install, and takes long time to compile.

Unfortunately, env vars in Cargo can't disable dependencies. So even if it was controlled via an env flag, it'd still have the cost of system dependency and compile time.

@kornelski kornelski force-pushed the bindgen branch 6 times, most recently from a8bcd16 to 67809a0 Compare August 12, 2019 10:16
@Keats
Copy link
Contributor

Keats commented Aug 15, 2019

The main reason to avoid bindgen is the heavy libclang/llvm dependency. It makes it harder to install, and takes long time to compile.

And is not really an option on Windows @ Azure Pipelines for example. I had to stick `syntect to a lower version to have CI working again. If it's not disabled by default, at least a feature that can be disabled like #113 would be great.

@kornelski
Copy link
Contributor Author

I've rebased this branch. I've also changed dependency's features=[] to default-features=false, because features is additive, so it didn't disable anything.

@Cogitri
Copy link
Contributor

Cogitri commented Aug 23, 2019

Oh, my bad, sorry.

@Cogitri
Copy link
Contributor

Cogitri commented Sep 6, 2019

Although I'm not a direct user of onig, it is in my dependency chain (of Tau, https://gitlab.gnome.org/World/Tau) and this PR has worked fine for me, avoiding me having to pull in lots of unnecessary deps.

@iwillspeak
Copy link
Collaborator

Hopefully I should have some time over the next few days to work on rust-onig again. I'll have a go pulling together these PRs to refactor bindgen useage and publish a new crate version when I'm done.

@iwillspeak iwillspeak self-assigned this Oct 2, 2019
Bumps to libonig to 6.9.3
@iwillspeak
Copy link
Collaborator

Closing in favor of #126. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants