Skip to content

make crate no_std compatible#530

Open
fschutt wants to merge 3 commits into
rust-windowing:masterfrom
fschutt:no_std
Open

make crate no_std compatible#530
fschutt wants to merge 3 commits into
rust-windowing:masterfrom
fschutt:no_std

Conversation

@fschutt

@fschutt fschutt commented Feb 6, 2021

Copy link
Copy Markdown

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

fschutt commented Feb 6, 2021

Copy link
Copy Markdown
Author

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

Lokathor commented Feb 6, 2021

Copy link
Copy Markdown

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

Development

Successfully merging this pull request may close these issues.

2 participants