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

Add no_std support again #105

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

stevefan1999-personal
Copy link

@stevefan1999-personal stevefan1999-personal commented Nov 10, 2024

This PR should add a minimal level of no_std support. This is needed in order for my shellcode generation project to work...Yes it is a little bit personal but I have my own restriction of not being able to use any std features to make the code as portable as possible...and that's the sole reason no_std exist

@CensoredUsername
Copy link
Owner

Looks proper on a first overview. Do you know if there's a way to test no_std compliance so this isn't accidentally broken in the future?

@stevefan1999-personal
Copy link
Author

Looks proper on a first overview. Do you know if there's a way to test no_std compliance so this isn't accidentally broken in the future?

That's a tricky question because most std components comes straight out of no_std (except the OS-specific mmap and the make-memory-executable bit) and if std works, so should no_std. If I interpret you right, you are referring to it as "to make sure that it just compiles under no_std specifically", right?

@CensoredUsername
Copy link
Owner

If I interpret you right, you are referring to it as "to make sure that it just compiles under no_std specifically", right?

Yeah, that is correct. Having that guarantee from the integration tests would be nice.

@Techcable
Copy link

Clippy has a useful family of lints called std_instead_of_core and std_instead_of_alloc that warn when unnecessarily using std types when alloc & core types would do.

@stevefan1999-personal
Copy link
Author

Clippy has a useful family of lints called std_instead_of_core and std_instead_of_alloc that warn when unnecessarily using std types when alloc & core types would do.

Yes I enabled them

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.

3 participants