brave / adblock-rust-ffi

An FFI crate to expose functionality from brave/adblock-rust
Mozilla Public License 2.0
47 stars 16 forks source link

Allow building with embedded-domain-resolver #37

Closed ernestask closed 2 years ago

ernestask commented 3 years ago

Currently, the bindings require client code to set an external domain resolver, which can be cumbersome, as the embedded one suffices. This commit adds a feature that enables embedded-domain-resolver in adblock-rust and conditionally hides the setter from the bindings.

Related: https://github.com/brave/adblock-rust-ffi/issues/35

ernestask commented 3 years ago

This isn’t ideal in that cbindgen only reads Cargo.toml for features, so separate cargo-build and cbindgen invocations might result in the header still exposing the setter, but it’s more than likely that there will only be one user of this.

ernestask commented 3 years ago

@antonok-edm, would be great if you could take a peek and let me know if this is close to what you had in mind.