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 library usable on embedded devices #5

Closed
teythoon opened this issue Apr 13, 2020 · 2 comments
Closed

Make library usable on embedded devices #5

teythoon opened this issue Apr 13, 2020 · 2 comments
Labels
enhancement New feature or request

Comments

@teythoon
Copy link
Contributor

I'd like to use lesspass on an embedded device, that means making it no_std and preferably also avoiding allocations and dependencies using allocations. I have some patches towards this, but wanted to discuss #4 and the overall goal first.

@71
Copy link
Owner

71 commented Apr 14, 2020

I think all allocations performed within the library itself can be avoided since we can compute the length of each vector ahead of time (and in some cases determine a constant upper bound). The problem is with the num_bigint dependency, which uses Vec behind the scenes and therefore allocates.

That bigint also has a constant maximum size (32 bytes), but I'm not aware of any no_std bigint library. Maybe we could provide our own implementation of these functions in no_std, with a potential loss of efficiency in that case?

@71 71 added the enhancement New feature or request label Apr 14, 2020
@71
Copy link
Owner

71 commented Dec 7, 2021

AFAIK, 21cfc80 makes the library fully no_std compatible. There are no no_std specific tests, though. Feel free to add some if you want (especially for corner cases, like having long entropy buffers).

@71 71 closed this as completed Dec 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants