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 an Arduino version #16

Closed
wants to merge 1 commit into from

Conversation

EmperorArthur
Copy link

This is based on the C++11 version, and is related to Issue #15.

While the Arduino does not have the standard library, it has its own String version. The F(...) macro wrapping the C strings tells the microcontroller to store the data in flash instead of permanently using a massive portion of RAM.

Similarly, due to how the system works, inlining reasonPhrase would cause the strings to be copied every time the function was called.

Modern build tools like PlatformIO automatically detect, compile, and link the cpp file without any special handling needed.

@j-ulrich
Copy link
Owner

Thank you for your contribution! I appreciate it!

However, I'm not sure yet if I want to add this complexity to this project. Especially because I have no experience with Arduino (or any microcontroller) development at all and it seems to be quite easy to modify the code to make it work on Arduino.
I mean, this adds another dimension. Someone else might want to use the C, C++ or Qt variants on Arduino.
Maybe there is also a way to improve the platform support without adding more variants of the code. So I have to think about this.

And I need to see how this would be tested on a CI (Travis or GitHub Actions), unless you are also willing to add something to the PR to enable this.

@j-ulrich j-ulrich linked an issue Mar 10, 2021 that may be closed by this pull request
@j-ulrich j-ulrich deleted the branch j-ulrich:master October 28, 2021 21:47
@j-ulrich j-ulrich closed this Oct 28, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Feature Request: Add an HttpStatusCodes_Ardunio.(h/cpp)
2 participants