Skip to content

Add freebsd support#620

Merged
GuillaumeGomez merged 1 commit intomasterfrom
freebsd
Dec 14, 2021
Merged

Add freebsd support#620
GuillaumeGomez merged 1 commit intomasterfrom
freebsd

Conversation

@GuillaumeGomez
Copy link
Owner

Fixes #433.

Only the disk support is missing and then it'll be ready. But we need rust-lang/libc#2565 to be merged first (and a new libc release).

@inferiorhumanorgans
Copy link

FWIW I would recommend using the sysctl crate instead of relying on libc directly as it provides a cross-platform idiomatic interface.

https://docs.rs/sysctl/latest/sysctl/index.html

@GuillaumeGomez
Copy link
Owner Author

How so? Unless I missed something, it's just helpers over the sysctl function. It doesn't cover much of sysinfo needs...

@inferiorhumanorgans
Copy link

It providers iterators and handles translation between types (including allocation for non-scalar types).

@GuillaumeGomez
Copy link
Owner Author

I still don't really see the point considering I wrote those wrappings too. libc provides the FFI declaration of sysctl function and I built on top of it.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add FreeBSD support?

2 participants