lxc_sys2/lib.rs
1//! Native bindings for [lxc](https://github.com/lxc/lxc) library.
2//!
3//! # Examples
4//!
5//! ```rust
6//! use std::ffi::CString;
7//!
8//! fn main() {
9//! let name = CString::new("playground").unwrap();
10//! let configpath = CString::new("/path/to/config").unwrap();
11//! let c = unsafe {
12//! lxc_sys2::lxc_container_new(
13//! name.as_ptr(),
14//! configpath.as_ptr(),
15//! )
16//! };
17//! let c_defined = unsafe { ((*c).is_defined)(c) };
18//! println!(
19//! "Container {:?} is defined: {}",
20//! name,
21//! c_defined
22//! )
23//! }
24//! ```
25//!
26//! # Versioning
27//!
28//! Version `lxc-sys2:1.0.0` correspondents to `lxc:1.0.0`. In case the bindings
29//! had a bug a new version `lxc-sys2:1.0.0-1` will be released which still
30//! correspondents to `lxc:1.0.0` including the patch to fix the binding
31//! related bug.
32
33#![allow(non_camel_case_types)]
34
35mod attach_options;
36mod lxccontainer;
37
38pub use attach_options::*;
39pub use lxccontainer::*;