gmsh_sys/
lib.rs

1#![allow(non_camel_case_types)]
2#![allow(non_snake_case)]
3/*!
4Low-level bindings to the Gmsh SDK. 
5
6Gmsh C API bindings (v4.4.1)
7
8Gmsh is copyright (C) 1997-2019 by C. Geuzaine and J.-F. Remacle
9
10By design, the Gmsh C API is purely functional, and only uses elementary types.  
11!*/
12
13// generated from gmshc.h @ commit d1769d55
14include!("bindings.rs"); 
15
16#[cfg(test)]
17mod tests {
18    use std::os::raw::{c_int};
19    use std::ffi::CString; 
20
21    #[test]
22    pub fn sanity() { 
23        // open gmsh 
24        let exec_name = CString::new("gmsh").unwrap();
25        let mut ierr: c_int = 0;
26        unsafe {
27             crate::gmshInitialize(1 as c_int, 
28                [exec_name.into_raw()].as_mut_ptr(), 0 as c_int, &mut ierr);
29        }
30
31        // close gmsh
32        let mut ierr: c_int = 0;
33        unsafe { 
34            crate::gmshFinalize(&mut ierr); 
35        }
36    }
37}