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

Support no_std #10

Closed
randombit opened this issue Nov 7, 2018 · 5 comments
Closed

Support no_std #10

randombit opened this issue Nov 7, 2018 · 5 comments
Labels
enhancement New feature or request

Comments

@randombit
Copy link
Owner

We can get the C types via libc, which supports no_std.

@randombit randombit added enhancement New feature or request good first issue Good for newcomers and removed good first issue Good for newcomers labels Nov 7, 2018
@randombit
Copy link
Owner Author

This requires removing use of Vec which would be a major change in API but probably worthwhile overall.

@randombit
Copy link
Owner Author

Good first step would be to just support no_std within botan-sys, which just requires using the libc types.

randombit added a commit that referenced this issue Nov 17, 2018
This allows botan-sys to be no_std by default.

The wrapper crate relies on Vec, String, CString and may prove
difficult to convert to no_std, not really sure.

See #10
@randombit
Copy link
Owner Author

Think the trick is to implement no_std compatible APIs that write to/read from slices, and then in situations when std is available implement the current API on top of the no_std implementations.

@randombit
Copy link
Owner Author

FFI CString requires libstd so I think we are SOL here

@randombit randombit reopened this Dec 7, 2018
@randombit
Copy link
Owner Author

Some hope of progress in rust-lang/rust#46736

Alternatively can DIY it ala https://gitlab.com/worr/rcstring/blob/master/src/lib.rs

randombit added a commit that referenced this issue Jan 31, 2019
randombit added a commit that referenced this issue Jan 31, 2019
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

1 participant