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 base64 simd support #12

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

stevefan1999-personal
Copy link
Contributor

This will require nightly, so it is disabled by default

@ninjasource
Copy link
Owner

Hi, thanks for your PR. Can you please let me know what the motivation for adding base64 simd support is? This crate is primarily for no_std use and I see that you have put if behind feature flags which is great but I'd like to know why base64 encoding was slowing things down so much to warrant this added complexity. Did you benchmark it? Base64 encoding is only done when initially setting up the connection. I'm asking because I purposefully chose not to have many dependencies because networking stuff should be easily auditable. Adding dependencies adds surface area for supply chain attack.

@stevefan1999-personal
Copy link
Contributor Author

@ninjasource using SIMD means smaller code size thanks to instruction level vectorization and this saves a lot of precious space on constrained microcontrollers such as Cortex-M4 where they do have a SIMD execution unit.

Also supply chain attack is very hard for Rust if you properly pin dependencies since version policy of Rust crates are immutable (implying idempotency between each build). Just check well before upgrading your code.

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.

None yet

2 participants