Skip to main content

picodata_plugin/
lib.rs

1#![allow(non_local_definitions)] // `#[sabi_trait]` problem
2
3use abi_stable::{rstr, std_types::RStr};
4
5pub mod authentication;
6pub mod background;
7pub mod error_code;
8pub mod internal;
9pub mod interplay;
10pub mod log;
11pub mod metrics;
12pub mod plugin;
13pub mod sql;
14pub mod system;
15pub mod transport;
16pub mod util;
17
18#[no_mangle]
19pub static PICOPLUGIN_VERSION: RStr<'static> = rstr!(env!("CARGO_PKG_VERSION"));
20
21// XXX: Tests relying on `tarantool::test` cannot work in standalone
22// test binaries produced by `#[cfg(test)]` due to missing symbols,
23// which means that `feature = "internal_test"` and `cfg(test)`
24// are mutually exclusive.
25//
26// In case of picodata-plugin specifically, these tests will be included in
27// picodata main binary (see picodata's dependency record for picodata-plugin),
28// which means that `picodata test` command will be the one running them.
29#[cfg(all(feature = "internal_test", not(test)))]
30mod test_macros {
31    use super::system::tarantool;
32
33    #[tarantool::test]
34    fn test() {}
35
36    #[tarantool::proc]
37    fn example() {}
38}