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

Allow building without serialization / json support #233

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

Conversation

jcelerier
Copy link
Contributor

For some very small embedded builds :)

@msteinbeck
Copy link
Owner

Hi @jcelerier,

thanks for your PR. On which embedded system do you want to use TinySpline?

I'll have a look at your PR. So far, it looks well done, thanks.

if(NOT TINYSPLINE_SERIALIZATION)
list(APPEND TINYSPLINE_C_DEFINITIONS "TINYSPLINE_NO_SERIALIZATION")
list(APPEND TINYSPLINE_CXX_DEFINITIONS "TINYSPLINE_NO_SERIALIZATION")
list(APPEND TINYSPLINE_BINDING_CXX_DEFINITIONS "TINYSPLINE_NO_SERIALIZATION")
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We will probably never build one or more bindings without serialization support.

@@ -1,6 +1,9 @@
#define TINYSPLINE_EXPORT
#include "tinyspline.h"

#if !defined(TINYSPLINE_NO_SERIALIZATION)
#include "parson.h" /* serialization */
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

#include <stdio.h> can also be excluded as we only use FILE and fopen from it. I propose to move this line into the !defined(TINYSPLINE_NO_SERIALIZATION) block.

@jcelerier
Copy link
Contributor Author

hi, thanks for your quick answers! I'm targetting ESP8266, ESP32 and raspberry pi pico (RP2040) so far

@msteinbeck
Copy link
Owner

Very interesting. Isn't the dynamic allocation of memory a problem on these platforms?

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.

2 participants