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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
//! With osquery-rust, we strive to make Osquery extension development a breeze. If you have ideas how
//! to improve developer experience, reach out to us on [GitHub](https://github.com/polarlabs).
//!
//! If you encounter any issue with this crate, please raise an [issue](https://github.com/polarlabs/osquery-rust/issues).
//! We are here to support you and your venture.
//!
//! As this is the crate's documentation, we focus here on the lib itself. However, osquery-rust is more than
//! just the lib. Please check out the project's [README on GitHub](https://github.com/polarlabs/osquery-rust) to
//! see the whole picture.
//!
//! ## Include osquery-rust in your Rust project
//!
//! Make sure to include osquery-rust as a dependency in your Cargo.toml. As osquery-rust is in its early
//! stages and might evolve fast, please check for the latest version often. We adhere to semver. So you can
//! rely on caret notation when selecting the version.
//!
//! ```toml
//! [dependencies]
//! osquery-rust = "^0.1"
//! ```
//!
//! ## Get started
//!
//! Annotate `main` with `#[osquery_rust::args]` to import code defining the CLI
//! of your extension.
//!
//! ```
//! use osquery_rust::prelude::*;
//!
//! #[osquery_rust::args]
//! fn main() -> std::io::Result<()> {
//!
//! // Args available due to annotation
//! let args = Args::parse();
//!
//! // Have a look at the example folder for more details.
//!
//! Ok(())
//! }
//! ```
//!
// Restrict access to osquery API to osquery-rust
// Users of osquery-rust are not allowed to access osquery API directly
pub
pub
pub
pub use crateServer;
// Re-exports
pub type ExtensionResponse = ExtensionResponse;
pub type ExtensionPluginRequest =ExtensionPluginRequest;
pub type ExtensionPluginResponse =ExtensionPluginResponse;
pub type ExtensionStatus =ExtensionStatus;
///
/// Expose all structures required in virtually any osquery extension
///
/// ```
/// use osquery_rust::prelude::*;
/// ```
// Defines a macro to import code from osquery-rust-codegen,
// if feature "macros" is enabled.
// Provide helper code from osquery-rust-codegen to define CLI of Osquery extension
codegen_reexport!;