[package]
edition = "2021"
rust-version = "1.85"
name = "llmosafe"
version = "0.7.7"
build = "build.rs"
exclude = [
".github/",
".sniper/",
"target/",
"tests/",
"/AGENTS.md",
"/data/",
"/Cargo.lock",
"/DESIGN_DECISION_*.md",
"/RECOMMENDATIONS.md",
]
autolib = false
autobins = false
autoexamples = false
autotests = false
autobenches = false
description = "Safety-critical cognitive safety library for AI agents. 4-tier architecture (Resource Body, Kernel, Working Memory, Sifter) with formal verification primitives, detection layer, and integration primitives."
homepage = "https://github.com/moeshawky/llmosafe"
documentation = "https://docs.rs/llmosafe"
readme = "README.md"
keywords = [
"safety",
"ai-agent",
"entropy",
"detection",
"guardrails",
]
categories = [
"development-tools",
"algorithms",
"embedded",
"no-std",
]
license = "MIT"
repository = "https://github.com/moeshawky/llmosafe"
[features]
dal = []
default = [
"std",
"dal",
]
full = [
"std",
"serde",
"dal",
]
serde = ["dep:serde"]
std = [
"libc",
"dep:windows-sys",
"dep:tracing",
]
testing = []
[lib]
name = "llmosafe"
crate-type = [
"rlib",
"cdylib",
]
path = "src/lib.rs"
[[example]]
name = "detection_demo"
path = "examples/detection_demo.rs"
[[example]]
name = "tower_middleware"
path = "examples/tower_middleware.rs"
[[bench]]
name = "llmosafe_benchmarks"
path = "benches/llmosafe_benchmarks.rs"
harness = false
[dependencies.libc]
version = "0.2"
optional = true
[dependencies.modular-bitfield]
version = "0.11.2"
[dependencies.serde]
version = "1"
features = ["derive"]
optional = true
[dependencies.tracing]
version = "0.1"
optional = true
[dev-dependencies.criterion]
version = "0.5"
[dev-dependencies.proptest]
version = "1.5.0"
[dev-dependencies.serde_json]
version = "1"
[dev-dependencies.trybuild]
version = "1"
[build-dependencies.cbindgen]
version = "0.26.0"
[target."cfg(windows)".dependencies.windows-sys]
version = "0.52"
features = [
"Win32_System_ProcessStatus",
"Win32_Foundation",
]
optional = true
[lints.clippy]
arithmetic_side_effects = "deny"
as_conversions = "allow"
cast_lossless = "allow"
cast_possible_truncation = "allow"
cast_possible_wrap = "allow"
cast_precision_loss = "allow"
cast_sign_loss = "allow"
dbg_macro = "deny"
debug_assert_with_mut_call = "deny"
doc_markdown = "allow"
expect_used = "deny"
filetype_is_file = "deny"
float_cmp = "allow"
float_cmp_const = "allow"
get_unwrap = "deny"
indexing_slicing = "allow"
integer_division = "allow"
lossy_float_literal = "deny"
map_err_ignore = "deny"
mem_forget = "deny"
missing_assert_message = "deny"
missing_docs_in_private_items = "allow"
missing_errors_doc = "allow"
missing_panics_doc = "allow"
missing_safety_doc = "allow"
mod_module_files = "deny"
module_name_repetitions = "allow"
must_use_candidate = "allow"
mutex_atomic = "deny"
needless_pass_by_value = "allow"
needless_raw_strings = "allow"
no_effect_underscore_binding = "allow"
option_if_let_else = "deny"
panic = "allow"
panic_in_result_fn = "allow"
print_stderr = "warn"
print_stdout = "warn"
rc_buffer = "deny"
rc_mutex = "deny"
redundant_closure_for_method_calls = "deny"
ref_option_ref = "deny"
rest_pat_in_fully_bound_structs = "warn"
same_name_method = "deny"
self_named_module_files = "deny"
semicolon_if_nothing_returned = "allow"
shadow_reuse = "allow"
shadow_same = "allow"
shadow_unrelated = "allow"
str_to_string = "deny"
string_add = "deny"
string_add_assign = "deny"
string_lit_as_bytes = "warn"
string_slice = "deny"
todo = "deny"
trailing_empty_array = "deny"
trivially_copy_pass_by_ref = "warn"
unchecked_time_subtraction = "deny"
undocumented_unsafe_blocks = "allow"
unimplemented = "deny"
uninlined_format_args = "allow"
unnecessary_safety_comment = "deny"
unnecessary_safety_doc = "deny"
unnecessary_self_imports = "warn"
unneeded_field_pattern = "deny"
unreadable_literal = "allow"
unused_async = "deny"
unused_self = "deny"
unwrap_used = "allow"
use_debug = "deny"
use_self = "allow"
verbose_bit_mask = "deny"
wildcard_dependencies = "deny"
wildcard_enum_match_arm = "deny"
zero_sized_map_values = "deny"
[lints.clippy.cargo]
level = "allow"
priority = -1
[lints.clippy.complexity]
level = "deny"
priority = -1
[lints.clippy.correctness]
level = "deny"
priority = -1
[lints.clippy.nursery]
level = "allow"
priority = -1
[lints.clippy.pedantic]
level = "allow"
priority = -1
[lints.clippy.perf]
level = "deny"
priority = -1
[lints.clippy.style]
level = "allow"
priority = -1
[lints.clippy.suspicious]
level = "deny"
priority = -1
[lints.rust]
let_underscore_drop = "deny"
missing_copy_implementations = "allow"
missing_debug_implementations = "allow"
trivial_casts = "deny"
trivial_numeric_casts = "deny"
unknown_lints = "allow"
unsafe_code = "allow"
unused_import_braces = "deny"
unused_lifetimes = "deny"
unused_parens = "allow"
unused_qualifications = "allow"
unused_results = "allow"
variant_size_differences = "warn"
[profile.dev]
panic = "abort"
[profile.release]
opt-level = 3
lto = "fat"
codegen-units = 1
panic = "abort"
strip = "symbols"