diff options
| author | Teddy Wing | 2018-08-26 01:32:43 +0200 |
|---|---|---|
| committer | Teddy Wing | 2018-08-26 01:32:43 +0200 |
| commit | 9b0e6e4207f5c44bef5d0b28ba036040845f82d8 (patch) | |
| tree | 5b36998374244fe599fe34670f9def45753110f4 /Cargo.toml | |
| parent | 4fd3fd4ded73aa4ba5320de50cd6b19fdf70a8a7 (diff) | |
| download | dome-key-map-9b0e6e4207f5c44bef5d0b28ba036040845f82d8.tar.bz2 | |
Get `run_key_action` to export correctly to C
Add a new wrapper function for `run_key_action` that uses C appropriate
inputs & outputs and calls into our Rusty `run_key_action`. This new
function now correctly gets a header generated for it by 'cbindgen'.
Immense thanks to Jake Goulding on the Rust FFI Omnibus for showing me
how to pass a slice argument from C:
http://jakegoulding.com/rust-ffi-omnibus/slice_arguments/
In order to pass the slice from C, we need to pass a C array and its
length to the function. Cool.
Diffstat (limited to 'Cargo.toml')
| -rw-r--r-- | Cargo.toml | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -5,6 +5,7 @@ version = "0.0.1" [dependencies] cocoa = "0.18.0" combine = "3.4.0" +libc = "0.2.43" [build-dependencies] cbindgen = "0.6.2" |
