diff options
| author | Teddy Wing | 2018-08-25 04:58:53 +0200 | 
|---|---|---|
| committer | Teddy Wing | 2018-08-25 05:03:46 +0200 | 
| commit | cdac4ed1ce81b76e6684f778fd07c8ebdacce556 (patch) | |
| tree | 3d40fd23cf36774b0368db32d48959da677b5f83 /src/parser.rs | |
| parent | 4b64b69e900e3eae5c410055c4c03a59c45419c2 (diff) | |
| download | dome-key-map-cdac4ed1ce81b76e6684f778fd07c8ebdacce556.tar.bz2 | |
Configure for importing from C/FFI
* Add `#[repr(C)]` on `HeadphoneButton` to hopefully be able to use it
  outside Rust
* Add `#[no_mangle]` to `run_key_action()`
* Export `run_key_action()` as a public function
* Build the crate as a static library
(But holy cow, a 19 MB library file?)
Diffstat (limited to 'src/parser.rs')
| -rw-r--r-- | src/parser.rs | 1 | 
1 files changed, 1 insertions, 0 deletions
| diff --git a/src/parser.rs b/src/parser.rs index d5cd860..c6c8cce 100644 --- a/src/parser.rs +++ b/src/parser.rs @@ -13,6 +13,7 @@ use combine::parser::char::{  use combine::parser::repeat::take_until;  use combine::stream::state::{SourcePosition, State}; +#[repr(C)]  #[derive(Debug, Hash, Eq, PartialEq)]  pub enum HeadphoneButton {      Play, | 
