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/// Data structures and logic for storing training/inference data
12pub mod dataset;
13
14/// File type detection and types
15pub mod ftype;
16
17/// Data structure and logic for training a model and calculating predictions
18pub mod model;
19
20/// N-gramming logic and data structures
21pub mod ngram;
22
23mod serde;
24
25/// Tests for similarity between files
26pub mod similarity;
27
28/// Logic for sorting files by type so models can then be trained on them.
29pub mod sorting;
30
31/// Logic to extract files of a specified type from a ZIP archive
32pub mod unzip;
33
34/// Malware Modeler version
35pub const VERSION: &str = concat!(
36    "v",
37    env!("CARGO_PKG_VERSION"),
38    "-",
39    env!("VERGEN_GIT_SHA"),
40    " ",
41    env!("VERGEN_BUILD_DATE")
42);
43
44/// Maximum recursion depth when walking a directory structure
45pub const MAX_RECURSION_DEPTH: usize = 10;
46
47/// Convenience type for vector of bytes
48pub type Bytes = Vec<u8>;