1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
//! This library builds Tor and a minimal set of its dependencies into a single library that can be
//! loaded like any other Rust crate dependency.
//!
//! The interface simply re-exports Tor's functions defined in its tor_api.h header.
//!
//! # Example
//!
//! ```no_run
//! # use std::ffi::CString;
//! # use tor_sys::*;
//! unsafe {
//! let config = tor_main_configuration_new();
//! let argv = vec![
//! CString::new("tor").unwrap(),
//! CString::new("--version").unwrap(),
//! ];
//! let argv: Vec<_> = argv.iter().map(|s| s.as_ptr()).collect();
//! tor_main_configuration_set_command_line(config, argv.len() as i32, argv.as_ptr());
//!
//! assert_eq!(tor_run_main(config), 0);
//! }
//! ```
use ;
type tor_main_configuration_t = c_void;
extern "C"