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

[WIP] Flexbuffers #5

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

[WIP] Flexbuffers #5

wants to merge 4 commits into from

Conversation

mustiikhalil
Copy link
Owner

Thank you for submitting a PR!

Please delete this standard text once you've created your own description.

If you make changes to any of the code generators (src/idl_gen*) be sure to
build your project, as it will generate code based on the changes. If necessary
the code generation script can be directly run (scripts/generate_code.py),
requires Python3. This allows us to better see the effect of the PR.

If your PR includes C++ code, please adhere to the
Google C++ Style Guide,
and don't forget we try to support older compilers (e.g. VS2010, GCC 4.6.3),
so only some C++11 support is available.

For any C++ changes, please make sure to run sh scripts/clang-format-git.sh

Include other details as appropriate.

Thanks!

Adds new storage container _InternalByteBuffer which
will be holding the data that will be created within the swift
lib, however reading data will be redirected to ByteBuffer, which
should be able to handle all types of data that swift provide without
the need to copy the data itself. This is due to holding a reference to
the data.

Removed unowned from the initializer

Replaces assumingMemoryBinding with bindMemory which is safer

Adds function that provides access to a UnsafeBufferPointer for
scalars and NativeStructs within swift

Updates docs

Suppress compilation warnings by replacing var with let
Using overflow operators within swift to improve performance

Adds tests for GRPC message creation from a retained _InternalByteBuffer
@github-actions github-actions bot added c++ codegen documentation Improvements or additions to documentation grpc python swift labels Feb 15, 2025
@mustiikhalil mustiikhalil force-pushed the flexbuffers branch 3 times, most recently from bf7c2ed to 1dd2f1e Compare February 15, 2025 21:30
This is the offical port for FlexBuffers within
swift, and it introcudes a Common Module where code
is shared between flatbuffers and flexbuffers.

Writing most supported values like maps, vectors,
nil and scalars into a flexbuffer buffer. And includes
tests to verify that its similar to cpp
Successfully read count for map
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c++ codegen documentation Improvements or additions to documentation grpc python swift
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant