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

make crate no_std compatible #530

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Conversation

fschutt
Copy link

@fschutt fschutt commented Feb 6, 2021

This is the groundwork for making gleam no_std compatible. I need gleam to be no_std so I can use the Rc<dyn Gl> in no_std crates without having to depend on the standard library.

All the "OS dependent" things that gleam uses are type definitions and it's not really necessary to depend on the standard library for that. This PR uses code from the cty crate, adjusted for the GL purpose.

It also changes c_char to c_uchar (which doesn't change the ABI, but it does clarify the usage because unsigned char and signed char are not always the same in C).

@fschutt
Copy link
Author

fschutt commented Feb 6, 2021

For some reason this doesn't build but that's not because of my code, but because of an error in the updated khronos bindings

@Lokathor
Copy link

Lokathor commented Feb 6, 2021

as a side note: gl46 already is no_std

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.

2 participants