Skip to content

Commit

Permalink
Add description and README
Browse files Browse the repository at this point in the history
  • Loading branch information
yutannihilation committed Dec 17, 2023
1 parent 4d8e4b6 commit 03f84c3
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
1 change: 1 addition & 0 deletions savvy-ffi/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
[package]
name = "savvy-ffi"
description = "Minimal FFI bindings for R's C API"
version.workspace = true
edition.workspace = true
authors.workspace = true
Expand Down
16 changes: 16 additions & 0 deletions savvy-ffi/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# savvy-ffi

Minimal FFI bindings for R's C API. This contains only a subset of APIs
sufficient for savvy framework. If you are looking for more complete one,
[libR-sys](https://crates.io/crates/libR-sys) is probably what you want.

Some more notable differences between libR-sys are:

* This is NOT a sys crate. Savvy-ffi is intended to be used within an R package,
which compiles a staticlib from Rust code first and then links it to R. At the
point of compilation by cargo, savvy-ffi is not yet linked, so this is fine.

* All definitions are written by hand, with some help of bindgen, into a single
file. There's no automatic version switch or platform switch. If some switch
is needed, it will be provided as a feature (e.g. `r_4_4_0`) and it's user's
responsibility to set it properly.

0 comments on commit 03f84c3

Please sign in to comment.