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/// N-fold cross validation over borrowed dataset rows
12pub mod crossval;
13
14/// Data structures and logic for storing training/inference data
15pub mod dataset;
16
17/// File type detection and types
18pub mod ftype;
19
20/// Fast hashing for n-gram keys
21pub mod hash;
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
29/// Bit-packed storage for dataset rows
30pub mod row;
31
32mod serde;
33
34/// Tests for similarity between files
35pub mod similarity;
36
37/// Logic for sorting files by type so models can then be trained on them.
38pub mod sorting;
39
40/// Logic for splitting a dataset into test/train
41pub mod split;
42
43/// Logic to extract files of a specified type from a ZIP archive
44pub mod unzip;
45
46/// Malware Modeler version
47pub const VERSION: &str = env!("MALWARE_MODELER_VERSION");
48
49/// Maximum recursion depth when walking a directory structure
50pub const MAX_RECURSION_DEPTH: usize = 10;
51
52/// Convenience type for vector of bytes
53pub type Bytes = Vec<u8>;