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

[Feature]: Add nanopb support #164

Closed
1 task done
chenjingyuanku opened this issue Feb 7, 2023 · 2 comments · Fixed by #180
Closed
1 task done

[Feature]: Add nanopb support #164

chenjingyuanku opened this issue Feb 7, 2023 · 2 comments · Fixed by #180

Comments

@chenjingyuanku
Copy link

Is there an existing issue for this?

  • I have searched the existing issues

Description

Dynamic memory allocation is mandatory in protobuf-c, but it is a resource-consuming practice to use dynamic memory allocation in many embedded devices. Even some low-end chips do not support malloc operation, while nanopb can use static memory allocation to perform encoding and decoding operations, so we hope to add nanopb support.

Acceptance Criteria

No response

Suggestions for a technical implementation

https://github.com/nanopb/nanopb

@strophy
Copy link
Collaborator

strophy commented Mar 13, 2023

@chenjingyuanku thanks for your feature request, I have attempted an initial naive implementation in #180

Are you familiar with building nanopb? I have a couple of questions:

  • The binary build still depends on 33MB of Python libraries, which would greatly increase the size of the final image. Is there any way to build a binary that doesn't depend on the presence of a Python runtime?
  • Is there any way to build this for aarch64? tools/make_linux_package.sh seems to assume the platform is linux-x86 but this is not always the case here. Can we do a PR to support different arch in this build script?

@chenjingyuanku
Copy link
Author

It uses Pyinstaller to package python source code into binary, I think aarch64 and x86 use the same package command. But since it uses Pyinstaller, it is unavoidable that the packaged binary contains the python runtime. I don't know if my understanding is correct.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants