Please help, Unresolved import

Please help, why is cargo not seeing the function "soup_session_add_feature"

error[E0432]: unresolved import `soup_sys::soup_session_add_feature`
 --> src/
7 | use soup_sys::{SOUP_LOGGER_LOG_BODY, soup_logger_new, soup_session_add_feature};
  |                                                       ^^^^^^^^^^^^^^^^^^^^^^^^
  |                                                       |
  |                                                       no `soup_session_add_feature` in the root
  |                                                       help: a similar name exists in the module: `soup_session_get_type`

my cargo.toml file

gio-sys = "0.10.1"
glib = "0.10.3"
glib-sys = "0.10.1"
serde = {version = "1.0", features = ["derive"]}
serde_json = "1.0"
soup-sys = "^0.10.0"
syn = "1.0.64"           # <= fixes serde_derive syn version  conflict

Also function is located on the root of the crate


You may have the wrong version of the native library: -- source

You'll need to explicitly enable the required version in your Cargo.toml:

soup-sys = { version = "0.10.0", features = ["v2_24"] }

The same is true for other gtk-rs crates. The web site has more examples.

Thanks, specifying the feature version "v2_24" worked

thanks you are right, it has something to do with the lib version, the version of the native library is very recent since i am using tumbleweed. but specifying the version using the soup-sys feature worked.