Add subsection headings

This commit is contained in:
Joshua Suskalo 2021-09-25 08:29:13 -05:00
parent 028ebea5b8
commit 2569b01eea

View file

@ -43,6 +43,7 @@ native function reference, followed by an optional docstring and attribute map,
then the C function identifier, including the name of the native symbol, a then the C function identifier, including the name of the native symbol, a
vector of argument types, and the return type. vector of argument types, and the return type.
### Primitive Types
Coffi defines a basic set of primitive types: Coffi defines a basic set of primitive types:
- byte - byte
- short - short
@ -60,8 +61,10 @@ Clojure function (with `long-long` mapping to the `long` function) when they are
passed as arguments to native functions. Additionally, the `c-string` type is passed as arguments to native functions. Additionally, the `c-string` type is
defined, although it is not primitive. defined, although it is not primitive.
In addition, some compound types are also defined in coffi, including struct and ### Composite Types
union types. For an example c struct and function: In addition, some composite types are also defined in coffi, including struct
and union types (unions will be discussed with serialization and
deserialization). For an example c struct and function:
```c ```c
typedef struct point { typedef struct point {
@ -119,7 +122,8 @@ in C.
[::ffi/array ::ffi/int 3] [::ffi/array ::ffi/int 3]
``` ```
In addition to these compound types, there is also support for Clojure ### Callbacks
In addition to these composite types, there is also support for Clojure
functions. functions.
```clojure ```clojure
@ -132,7 +136,15 @@ type and message in the registers section, but it's important to be aware of all
the same. Ideally you should test your callbacks before actually passing them to the same. Ideally you should test your callbacks before actually passing them to
native code. native code.
TODO Talk about writing your own serdes ### TODO Variadic Functions
### TODO Global Variables
### TODO Complex Wrappers
### TODO Serialization and Deserialization
### TODO Data Model
## License ## License