Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
F
flatbuffers
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
flatbuffers
Commits
47d4b469
Commit
47d4b469
authored
Mar 25, 2016
by
Mikkel Fahnøe Jørgensen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Documentation for C bindings
parent
a649cb7d
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
70 additions
and
11 deletions
+70
-11
CUsage.md
docs/source/CUsage.md
+54
-0
FlatBuffers.md
docs/source/FlatBuffers.md
+4
-2
Support.md
docs/source/Support.md
+9
-9
Tutorial.md
docs/source/Tutorial.md
+0
-0
doxyfile
docs/source/doxyfile
+1
-0
doxygen_layout.xml
docs/source/doxygen_layout.xml
+2
-0
No files found.
docs/source/CUsage.md
0 → 100644
View file @
47d4b469
Use in C {#flatbuffers_guide_use_c}
==========
The C language binding exists in a separate project named
[
FlatCC
](
https://github.com/dvidelabs/flatcc
)
.
The
`flatcc`
C schema compiler can generate code offline as well as
online via a C library. It can also generate buffer verifiers and fast
JSON parsers, printers.
Great effort has been made to ensure compatibily with the main
`flatc`
project.
## General Documention
-
[
Tutorial
](
@ref
flatbuffers_guide_tutorial) - select C as language
when scrolling down
-
General Use in C (the README)
<https://github.com/dvidelabs/flatcc/blob/master/README.md>
-
The C Builder Interface, advanced
<https://github.com/dvidelabs/flatcc/blob/master/doc/builder.md>
## Basic Reflection
The C-API does support reading binary schema (.bfbs)
files via code generated from the
`reflection.fbs`
schema, and an
[
example usage
](
https://github.com/dvidelabs/flatcc/tree/master/samples/reflection
)
shows how to use this. The schema files are pre-generated
in the
[
runtime distribution
](
https://github.com/dvidelabs/flatcc/tree/master/include/flatcc/reflection
)
. Extended reflection
## Mutating Reflection
The C-API does not support mutating reflection like C++ does.
Although the following isn't reflection, it is possible to create new
buffers using complex objects from existing buffers as source. This can
be very efficient due to direct copy semantics without endian conversion or
temporary stack allocation.
It is currently not possible to use an existing table or vector of table
as source, but it would be possible to add support for this at some
point.
## Why not integrate with the `flatc` tool?
[
It was considered how the C code generator could be integrated into the
`flatc`
tool](https://github.com/dvidelabs/flatcc/issues/1), but it
would either require that the standalone C implementation of the schema
compiler was dropped, or it would lead to excessive code duplication, or
a complicated intermediate representation would have to be invented.
Neither of these alternatives are very attractive, and it isn't a big
deal to use the
`flatcc`
tool instead of
`flatc`
given that the
FlatBuffers C runtime library needs to be made available regardless.
docs/source/FlatBuffers.md
View file @
47d4b469
...
@@ -4,8 +4,8 @@ FlatBuffers {#flatbuffers_index}
...
@@ -4,8 +4,8 @@ FlatBuffers {#flatbuffers_index}
# Overview {#flatbuffers_overview}
# Overview {#flatbuffers_overview}
[
FlatBuffers
](
@ref
flatbuffers_overview) is an efficient cross platform
[
FlatBuffers
](
@ref
flatbuffers_overview) is an efficient cross platform
serialization library for C++, C#, Go, Java, JavaScript, PHP, and Python
serialization library for C++, C#,
C,
Go, Java, JavaScript, PHP, and Python
(
C and Ruby
in progress). It was originally created at Google for game
(
Ruby and Swift
in progress). It was originally created at Google for game
development and other performance-critical applications.
development and other performance-critical applications.
It is available as Open Source on
[
GitHub
](
http://github.com/google/flatbuffers
)
It is available as Open Source on
[
GitHub
](
http://github.com/google/flatbuffers
)
...
@@ -131,6 +131,8 @@ sections provide a more in-depth usage guide.
...
@@ -131,6 +131,8 @@ sections provide a more in-depth usage guide.
in your own programs.
in your own programs.
-
How to
[
use the generated Go code
](
@ref
flatbuffers_guide_use_go) in your
-
How to
[
use the generated Go code
](
@ref
flatbuffers_guide_use_go) in your
own programs.
own programs.
-
How to
[
use the generated C code
](
@ref
flatbuffers_guide_use_c) in your
own programs.
-
[
Support matrix
](
@ref
flatbuffers_support) for platforms/languages/features.
-
[
Support matrix
](
@ref
flatbuffers_support) for platforms/languages/features.
-
Some
[
benchmarks
](
@ref
flatbuffers_benchmarks) showing the advantage of
-
Some
[
benchmarks
](
@ref
flatbuffers_benchmarks) showing the advantage of
using FlatBuffers.
using FlatBuffers.
...
...
docs/source/Support.md
View file @
47d4b469
...
@@ -20,17 +20,17 @@ NOTE: this table is a start, it needs to be extended.
...
@@ -20,17 +20,17 @@ NOTE: this table is a start, it needs to be extended.
Feature | C++ | Java | C# | Go | Python | JS | C | PHP | Ruby
Feature | C++ | Java | C# | Go | Python | JS | C | PHP | Ruby
------------------------------ | ------ | ------ | ------ | ------ | ------ | --------- | ---- | --- | ----
------------------------------ | ------ | ------ | ------ | ------ | ------ | --------- | ---- | --- | ----
Codegen for all basic features | Yes | Yes | Yes | Yes | Yes | Yes |
WiP
| WiP | WiP
Codegen for all basic features | Yes | Yes | Yes | Yes | Yes | Yes |
Yes
| WiP | WiP
JSON parsing | Yes | No | No | No | No | No |
No
| No | No
JSON parsing | Yes | No | No | No | No | No |
Yes
| No | No
Simple mutation | Yes | WIP | WIP | No | No | No | No | No | No
Simple mutation | Yes | WIP | WIP | No | No | No | No | No | No
Reflection | Yes | No | No | No | No | No |
No
| No | No
Reflection | Yes | No | No | No | No | No |
Basic
| No | No
Buffer verifier | Yes | No | No | No | No | No |
No
| No | No
Buffer verifier | Yes | No | No | No | No | No |
Yes
| No | No
Testing: basic | Yes | Yes | Yes | Yes | Yes | Yes |
?
| ? | ?
Testing: basic | Yes | Yes | Yes | Yes | Yes | Yes |
Yes
| ? | ?
Testing: fuzz | Yes | No | No | Yes | Yes | No |
?
| ? | ?
Testing: fuzz | Yes | No | No | Yes | Yes | No |
No
| ? | ?
Performance: | Superb | Great | Great | Great | Ok | ? |Superb| ? | ?
Performance: | Superb | Great | Great | Great | Ok | ? |Superb| ? | ?
Platform: Windows | VS2010 | Yes | Yes | ? | ? | ? |
?
| ? | ?
Platform: Windows | VS2010 | Yes | Yes | ? | ? | ? |
No
| ? | ?
Platform: Linux | GCC282 | Yes | ? | Yes | Yes | ? |
?
| ? | ?
Platform: Linux | GCC282 | Yes | ? | Yes | Yes | ? |
Yes
| ? | ?
Platform: OS X | Xcode4 | ? | ? | ? | Yes | ? |
?
| ? | ?
Platform: OS X | Xcode4 | ? | ? | ? | Yes | ? |
Yes
| ? | ?
Platform: Android | NDK10d | Yes | ? | ? | ? | ? | ? | ? | ?
Platform: Android | NDK10d | Yes | ? | ? | ? | ? | ? | ? | ?
Platform: iOS | ? | ? | ? | ? | ? | ? | ? | ? | ?
Platform: iOS | ? | ? | ? | ? | ? | ? | ? | ? | ?
Engine: Unity | ? | ? | Yes | ? | ? | ? | ? | ? | ?
Engine: Unity | ? | ? | Yes | ? | ? | ? | ? | ? | ?
...
...
docs/source/Tutorial.md
View file @
47d4b469
This diff is collapsed.
Click to expand it.
docs/source/doxyfile
View file @
47d4b469
...
@@ -750,6 +750,7 @@ INPUT = "FlatBuffers.md" \
...
@@ -750,6 +750,7 @@ INPUT = "FlatBuffers.md" \
"Compiler.md" \
"Compiler.md" \
"Schemas.md" \
"Schemas.md" \
"CppUsage.md" \
"CppUsage.md" \
"CUsage.md" \
"GoUsage.md" \
"GoUsage.md" \
"JavaCsharpUsage.md" \
"JavaCsharpUsage.md" \
"JavaScriptUsage.md" \
"JavaScriptUsage.md" \
...
...
docs/source/doxygen_layout.xml
View file @
47d4b469
...
@@ -25,6 +25,8 @@
...
@@ -25,6 +25,8 @@
title=
"Writing a schema"
/>
title=
"Writing a schema"
/>
<tab
type=
"user"
url=
"@ref flatbuffers_guide_use_cpp"
<tab
type=
"user"
url=
"@ref flatbuffers_guide_use_cpp"
title=
"Use in C++"
/>
title=
"Use in C++"
/>
<tab
type=
"user"
url=
"@ref flatbuffers_guide_use_c"
title=
"Use in C"
/>
<tab
type=
"user"
url=
"@ref flatbuffers_guide_use_go"
<tab
type=
"user"
url=
"@ref flatbuffers_guide_use_go"
title=
"Use in Go"
/>
title=
"Use in Go"
/>
<tab
type=
"user"
url=
"@ref flatbuffers_guide_use_java_c-sharp"
<tab
type=
"user"
url=
"@ref flatbuffers_guide_use_java_c-sharp"
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment