doc: update ffi design
This commit is contained in:
@@ -1 +1,17 @@
|
||||
# C/C++ Side
|
||||
|
||||
This chapter introduces some things you need to know before writing the C/C++ side files of a C-friendly FFI.
|
||||
|
||||
## Header File Structure
|
||||
|
||||
Writing the C/C++ side of a C-friendly FFI requires two kinds of header files: the C headers and the C++ headers. Each kind may contain any number of individual header files.
|
||||
|
||||
The C headers are a simple wrapper around the FFI surface. They must be loadable correctly in both C and C++ translation units.
|
||||
|
||||
It is important that the C++ headers are wrappers around the C headers, not rewrites of them from scratch. The C++ headers build on top of the declarations already provided by the C headers and only add the C++ conveniences.
|
||||
|
||||
## Language Standards
|
||||
|
||||
The C headers target the C11 language standard.
|
||||
|
||||
The C++ headers target the C++17 language standard.
|
||||
|
||||
Reference in New Issue
Block a user