Skip to main content

malware_modeler/
lib.rs

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