Skip to content

Commit 2cdb948

Browse files
committed
README updates
1 parent 5c63e98 commit 2cdb948

File tree

2 files changed

+14
-4
lines changed

2 files changed

+14
-4
lines changed

README.md

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -74,10 +74,21 @@ buffer with:
7474

7575
Arrays and strings must be passed as pointers.
7676

77-
## Installation
77+
### Structs
7878

79-
Installation requires that [`cmake`](https://cmake.org/) is installed. Other
80-
than that, this should install as an npm module without issue.
79+
For now, `sbfffi` doesn't have any built-in support for structs. That being
80+
said, there are some helpful libraries like
81+
[`shared-structs`](https://www.npmjs.com/package/shared-structs) and
82+
[`ref-napi`](https://www.npmjs.com/package/ref-napi) (and its family of
83+
modules). As long as you can build up a C struct into a Buffer, you can pass
84+
pointers to them into C functions. Non-pointer struct arguments or return values
85+
are not supported.
86+
87+
## Development
88+
89+
Using a non-release version of `sbffi` requires that
90+
[`cmake`](https://cmake.org/) is installed in order to compile the native
91+
addon.
8192

8293
## Benchmarks
8394

TODO.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,2 @@
11
* Support var args (`va_list`)
22
* Test with actual threads.
3-
* Build or recommend a library for dealing with C structs/enums/unions.

0 commit comments

Comments
 (0)