Skip to content

confusing documentation about '*-sys' crates? #9868

Closed
@davepacheco

Description

@davepacheco

I apologize in advance if I'm misunderstanding this (or if I've filed this in the wrong place!

Regarding *-sys packages, the Cargo book says:

Some Cargo packages that link to system libraries have a naming convention of having a -sys suffix. Any package named foo-sys should provide two major pieces of functionality:

  • The library crate should link to the native library libfoo. This will often probe the current system for libfoo before resorting to building from source.
  • The library crate should provide declarations for functions in libfoo, but not bindings or higher-level abstractions.

I'm confused about that second bullet. As I understand it, the crate should provide bindings and nothing else -- no higher-level abstractions. Is that right? I'm not sure what a "declaration" would even be in this context.

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-bugCategory: bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions