Commit Graph

27 Commits

Author SHA1 Message Date
mustiikhalil e1be8aaadd
Bump version for latest swift version (#6121) 2020-09-17 12:28:42 -07:00
mustiikhalil 89435303b7
[Swift] Migrates struct write APIS to write directly to the buffer (#6093)
* Migrates struct write APIS to in place APIS

* Fixes indentation in grpc swift
2020-09-17 17:10:59 +03:00
mustiikhalil 63cc0eec4e
Adds a serialize helper function to native table (#6059)
* Adds a serialize helper function to native table
* Updated version
2020-08-04 13:53:40 +03:00
mustiikhalil f1025b2847
[Feature] Checks for Nullable strings (#6050)
* Allows null strings in createString method c#

* Adds nullable strings to JS and swift

* Changes js checks

* Fixes typo
2020-07-27 09:57:50 -07:00
mustiikhalil ff1b73128d
[Swift] Optional Scalars Preparation (#6028)
* Perpares swift to take optional scalars + adds optional string helper method + disables linters in generated code

* Small fix for generated code

* Update grpc support to alpha 17 for swift
2020-07-20 20:38:50 +03:00
mustiikhalil 37a5dee105
Code cleanup + updates test and readme (#6004)
Updates Readme + adds asserts

Fixes documentation
2020-06-30 21:37:43 +03:00
Liu Liu d64078eb27
[Swift] Initialize memory when clear ByteBuffer (#5982)
* Initialize memory when clear ByteBuffer

It seems (based on my limited understanding) that FlatBuffers requires
the writable area to be 0 initialized. However, we missed it when clear
the buffer to reinitialize it.

This PR fixed that by calling initialize (also fixed the typo)
explicitly.

* Update version to 0.5.3
2020-06-25 15:11:38 -07:00
Liu Liu f35184aef9
[Swift] Add parsing from unowned UnsafeMutableRawPointer for ByteBuffer (#5981)
* RFC: Add ExternalStorage for ByteBuffer in Swift implementation

This PR proposed one more API for ByteBuffer such that no copy is
required to parse FlatBuffers content. This API has limited use, but for
cases that you need to read part of the flatbuffers' data to decide
whether you want to parse / copy the full buffer out, it is useful.

* Use a variable rather than protocol.

* Revert grouping changes from the other PR.

* Add unit test to read from unowned UnsafePointer.

* Manifest changed.
2020-06-22 17:05:36 -07:00
mustiikhalil 2e57d80b13
[Swift] Internal library improvements (#5965)
* Moves addition to overflow addition in swift by using &+

Moves code to use Int instead of UInt32 & fixes functions

Updates swift performance to great

Updated version to 0.5.2

Updated swift package version to 5.2

Updated docker to swift 5.2

Removed all none & arithmetic operations

* Small refactoring
2020-06-18 10:14:38 -07:00
mustiikhalil 7cb4762a61
[Swift] Improving reallocation time by using memcpy and moving reallocation code to storage (#5960)
Removes stride

Use capacity - current size to initialize

Fixes memory leak

Updated test code for linux
2020-06-11 08:53:32 -07:00
mustiikhalil 108e981dbe
Required is now implemented in swift (#5952) 2020-06-08 10:08:16 -07:00
mustiikhalil 666800da36
Adds bool support in structs + updates grpc support + CI upgrades (#5943) 2020-06-04 09:14:18 -07:00
mustiikhalil 870ecbc09a
[swift] Moves code to use VTablesStorage (#5888)
* Moves the code to use _vtablestorage

Rebuilt the test to confirm to the new API

Adds documentation + generates code for grpc

Reverts indentation

v0.4.0

Updated swift/readme.md

Updates VtableStorage to ensure space instead of reallocating each time

Fixes str count not being correct

* Fixes issue with boolean constant not being set + removes unused function
2020-05-07 12:28:42 -07:00
mustiikhalil 2e9a196734
Updates swift docs for package management (#5883)
Small fix for the clear function
2020-05-04 10:18:38 -07:00
mustiikhalil cb4d0f72e3
[Swift] Object API support (#5826)
* Adds Object-api support to swift

* Fixed indentation issues

* Removed indentation within namespaces
2020-04-13 09:28:56 -07:00
mustiikhalil 9655e12d6d
Upgraded swift implementation for grpc (#5843)
Updated version number
2020-04-06 10:05:56 -07:00
mustiikhalil a83caf5910
Improves performance for the swift library by using structs + a storage class (#5835) 2020-04-02 12:55:30 -07:00
mustiikhalil 3e9ac3cff9
[Scripts] Adds swift to generated code (#5806)
* Moved swifttest.sh code generator to generate_code + fix issue in ghpages

* Fixes small issue with cocoapods documentation
2020-03-16 11:55:59 -07:00
Wouter van Oortmerssen 6df40a2471 pre-tag version bump for 1.12
Change-Id: I84a9365e9d8a1afe333b1df85058401ffe0a6b7c
2020-03-12 15:33:39 -07:00
mustiikhalil 0dba63909f
Removes the inner loop in the endtable check written tables (#5803) 2020-03-12 12:13:03 -07:00
mustiikhalil 34305c4ce4
[Swift] Adds GRPC to Swift (#5758)
* Adds the basic structure for required to add grpc support

Added the message implementation

Updated the code to confirm to the protocol flatbuffersobject

Adds an example for Swift flatbuffers GRPC

Started implementing the swift GRPC code Gen

Generator generates protocols now

Fixing ci issues

Migrated the logic to use grpc_generator::File instead of string

Refactored swift project

Implemented GRPC in swift

Finished implementing GRPC in swift

Fixes issues

Adds contiguousBytes initializer to swift

Adds documentation + fixes buffer nameing in tables + structs

Adds documentation + fixes buffer nameing in tables + structs

Updated tests

* Updated version
2020-02-24 09:27:41 -08:00
mustiikhalil 3ec7a53c62
Adds cocoapods and a readme of how to get the package (#5771) 2020-02-21 11:42:07 -08:00
mustiikhalil c580fa284c Adds min and max, comments, and all of swift's keywords + fix docs (#5737) 2020-01-27 10:05:41 -08:00
mustiikhalil 316d7c2089 Creates a flatbuffers validation function + small fix (#5725) 2020-01-24 14:55:57 -08:00
vkill 7cdfc8475e [Swift] Fix padding function overflow when bufSize is 0 (#5721)
* [Swift] Fix padding function overflow when bufSize is 0

[Swift] Generate linuxmain

* [Swift] Using the overflow addition operator to resolve integer overflow
2020-01-24 09:45:19 -08:00
vkill c4b2b0a25d [Swift] Support create long string (#5709)
* [Swift] Support create long string

* [Swift] Move the test case to correct dir
2020-01-16 12:08:59 -08:00
mustiikhalil 04d80f255d [Swift] Swift implementation 🎉🎉 (#5603)
* Implemented the swift version of Flatbuffers

Implemented serailzing, reading, and mutating data from object monster

Fixes mis-aligned pointer issue

Fixes issue when shared strings are removed from table

Adds swift enum, structs code gen

Fixed namespace issues + started implementing the table gen

Added Mutate function to the code generator

Generated linux test cases

Fixed an issue with bools, and structs readers in table writer

Swift docker image added

Updated the test cases, and removed a method parameters in swift

Fixed createVector api when called with scalars

Fixed issues with scalar arrays, and fixed the code gen namespaces, added sample_binary.swift

Cleaned up project

Added enum vectors, and their readers

Refactored code

Added swift into the support document

Added documentation in docs, and fixed a small issue with Data() not being returned correctly

Fixes Lowercase issue, and prevents generating lookups for deprecated keys

* Made all the required funcs to have const + removed unneeded code + fix lowercase func

* Removed transform from lowercased and moved it to function

* Fixes an issue with iOS allocation from read

* Refactored cpp code to be more readable

* casts position into int for position

* Fix enums issue, moves scalar writer code to use memcpy

* Removed c_str from struct function

* Fixed script to generate new objects when ran on travis ci: fix

* Handles deallocating space allocated for structs

* Updated the test cases to adhere to the fileprivate lookup, no mutation for unions, and updated the names of the vector functions
2020-01-09 12:12:10 -08:00