[Draft] Optional C FFI ABI - #16
Conversation
|
Could we get an ABI versioning symbol here? If we need to change the interface and are using dlopen that would cause issues. |
| /// # Panics | ||
| /// Panics if the arena lock is poisoned during the scan write phase. | ||
| #[unsafe(no_mangle)] | ||
| pub unsafe extern "C" fn lighthouse_scan( |
There was a problem hiding this comment.
Ditto, for setting count to 0 on error
|
Could we use c_char for the BSID instead of the int8? |
|
iirc my AUR 1.4.0 folded STANDBY commands into OFF for V1 lighthouses, might be better to guard caller against bad commands by keeping the fold with a comment. |
This version v1 guards against using the STANDBY command if matches!(state, State::Standby) {
return Err(Error::InvalidState(
"V1 base stations do not support STANDBY, use OFF or ON".into(),
));
}Did you still want STANDBY to fallback to OFF for v1 with warning message? I made the suggested changes, let me know if there's anything else I should change |
Open discussion on the requested C FFI ABI, I'm not a big C user so I used Qwen3.6 27b to help, so this might be a complete dumpster fire. Let me know what you think, what should be changed, or if it should be deleted off the face of the earth. Feel free to nitpick or scream bloody murder.
Should I include builds of the library in the GitHub releases with the CLI binaries?