Skip to main content

malware_modeler/
lib.rs

1// SPDX-License-Identifier: Apache-2.0
2
3#![doc = include_str!("../readme.md")]
4#![cfg_attr(docsrs, feature(doc_cfg))]
5#![deny(clippy::all)]
6//#![deny(clippy::cargo)]
7#![deny(clippy::pedantic)]
8#![allow(clippy::doc_markdown)] // Clippy has issues with some names in the research list
9#![deny(missing_docs)]
10#![forbid(unsafe_code)]
11
12/// Array of boolean values as a large bit vector
13#[cfg(feature = "experimental")]
14#[cfg_attr(docsrs, doc(cfg(feature = "experimental")))]
15pub mod bitarray;
16
17/// Data structures and logic for storing training/inference data
18pub mod dataset;
19
20/// File type detection and types
21pub mod ftype;
22
23/// Data structure and logic for training a model and calculating predictions
24pub mod model;
25
26/// N-gramming logic and data structures
27pub mod ngram;
28
29mod serde;
30
31/// Tests for similarity between files
32pub mod similarity;
33
34/// Logic for sorting files by type so models can then be trained on them.
35pub mod sorting;
36
37/// Logic to extract files of a specified type from a ZIP archive
38pub mod unzip;
39
40/// Malware Modeler version
41pub const VERSION: &str = env!("MALWARE_MODELER_VERSION");
42
43/// Maximum recursion depth when walking a directory structure
44pub const MAX_RECURSION_DEPTH: usize = 10;
45
46/// Convenience type for vector of bytes
47pub type Bytes = Vec<u8>;