-
Notifications
You must be signed in to change notification settings - Fork 14
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
Fixed: Build in no_std environment #36
Conversation
Ah yeah, good catch. I intended to initially make the It's also good to know that our tests currently don't properly catch such cases. We should probably add a IMO we shouldn't just require
Personally I don't have a strong opinion here. The second variant might be nicer in the long run, because it'd also allow using the formatter in |
Yup, I saw the comment. Seems I just tabbed out for work stuff and forgot to come back. Anyway, I think the second option is probably more preferable. I feel like allowing the user to 'opt-into' functionality is preferable, compared to effectively locking them out (by asking for full Although I myself am not an embedded programmer, I cannot really imagine a world where you'd be programming without any sort of allocator, even if it allocates in some memory block at the end (top) of the stack. Assuming there are a bunch of no_std users who do have some form of alloc, it'd feel bad to exclude functionality they can still technically access without full std. |
Cool, no pressure or hurry: it just seemed like you might have missed it since you immediately fixed the one thing and then went idle. :)
So far I've managed to avoid need for a dynamic allocator in all my no-libc projects. But I agree with option 2 being preferable in general.
Yeah. The separate |
Superseded by #37 |
This simple PR makes it possible to build the library in a
no_std
environment once again.Although the library itself is
no_std
, it's being tested under anstd
environment; as a result of this, implicituse
(s) that are automatically imported by std apply while building tests, but not while building from an actualno_std
environment.In this case, we needed to specify the imports from
alloc
manually.