Skip to main content

ogdf_sys/
lib.rs

1#[cxx::bridge(namespace = "graph")]
2mod pod {
3    #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
4    pub struct Edge {
5        pub u: usize,
6        pub v: usize,
7    }
8
9    impl CxxVector<Edge> {}
10}
11
12pub use pod::Edge;
13
14#[allow(clippy::all, unsafe_op_in_unsafe_fn)]
15pub mod autogen {
16    use autocxx::prelude::*;
17
18    include_cpp! {
19        #include "types.hpp"
20        #include "spqr.hpp"
21        #include "mps.hpp"
22
23        extern_cpp_type!("graph::Edge", crate::pod::Edge)
24
25        generate!("graph::boyer_myrvold_witness")
26        generate!("graph::PlanarSubgraph")
27    }
28
29    pub use ffi::graph;
30}