Skip to content

Commit

Permalink
Add a static library crate with a C FFI (#21)
Browse files Browse the repository at this point in the history
* Add maybenot-ffi

* Add makefile and readme

* Run cbindgen in build script

* Embed crate version in static library

* Correctly expose crate version using a function

instead of a static &CStr, which is not FFI safe

* Move mod statements below use

* Make public Rust API be same as public FFI API

* Pin cbindgen to avoid any format change surprises

* Remove obsolete error type

* Remove thiserror

* Remove default cbindgen.toml options

* Remove --locked

* Respect CARGO_TARGET_DIR in makefile

* Commit Cargo.lock

Also remove cbindgen version pin, since version pinning in
Cargo.toml has problems when dealing with multiple versions of the
some package in the dependency tree.

* Set ffi lib version to 1.0.0

* Add maybenot-ffi to /README.md

* Tighten restriction on null bytes in version str

* Remove machine string filtering & trimming in ffi

* More safety docs

* Change on_event ffi func to accept multiple events
  • Loading branch information
hulthe authored May 16, 2024
1 parent d7c1a3e commit e911b6b
Show file tree
Hide file tree
Showing 13 changed files with 1,702 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
/target
/Cargo.lock
*.a
Loading

0 comments on commit e911b6b

Please sign in to comment.