Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

std::sys_common::net assumes existence of libc #19

Open
IsaacWoods opened this issue Apr 25, 2018 · 2 comments
Open

std::sys_common::net assumes existence of libc #19

IsaacWoods opened this issue Apr 25, 2018 · 2 comments

Comments

@IsaacWoods
Copy link

IsaacWoods commented Apr 25, 2018

As far as I understand, the sys_common module is meant to be common to all platforms. However, sys_common::net assumes existence of a LibC, specifically for some of its types:

use libc::{c_int, c_void};

In my case, I have redefined these types within my sys implementation and just use those instead, but I thought I'd get discussion started on whether, moving forward, we're going to continue assuming every platform should have to provide a LibC, and whether we could eliminate these particular use-cases at any point?

Just for context, my goal here is to provide a libstd implementation for my OS that doesn't depend on a LibC at all.

@jethrogb
Copy link
Collaborator

we're going to continue assuming every platform should have to provide a LibC

Most definitely not.

The types you mention are actually part of the C ABI, not actual libc. They're also defined in std::os::raw. There has been significant discussion in the past about where these type definitions should live. I'm still in favor of a ctypes crate. See #13

@FenrirWolf
Copy link

sys_common::net also has the problem of not really being "common" code like most other things in the sys_common module. Seems like the platform-specific bits should be in sys instead.

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

No branches or pull requests

3 participants