[package]
name = "fusevm"
version = "0.13.8"
edition = "2021"
description = "Language-agnostic bytecode VM with fused superinstructions and a 3-tier Cranelift JIT (linear/block/tracing)"
license = "MIT"
authors = ["MenkeTechnologies"]
repository = "https://github.com/MenkeTechnologies/fusevm"
homepage = "https://menketechnologies.github.io/fusevm/"
documentation = "https://docs.rs/fusevm"
readme = "README.md"
keywords = ["bytecode", "vm", "jit", "interpreter", "fusevm"]
categories = ["compilers"]

[dependencies]
serde = { version = "1", features = ["derive", "rc"] }
tracing = "0.1"
glob = "0.3"
chrono = "0.4"
cranelift-jit = { version = "0.130", optional = true }
cranelift-codegen = { version = "0.130", optional = true }
cranelift-frontend = { version = "0.130", optional = true }
cranelift-native = { version = "0.130", optional = true }
cranelift-module = { version = "0.130", optional = true }
libc = { version = "0.2", optional = true }

[features]
default = []
jit = ["cranelift-jit", "cranelift-codegen", "cranelift-frontend", "cranelift-native", "cranelift-module"]
# Persistent on-disk cache of native JIT code. Skips Cranelift codegen across
# process restarts. On by default once enabled — caches to ~/.cache/fusevm-jit
# (override with FUSEVM_JIT_CACHE_DIR or JitCompiler::set_jit_cache_dir, disable
# with FUSEVM_JIT_CACHE_DIR=off). Pulls in `libc` for executable memory mapping.
jit-disk-cache = ["jit", "dep:libc"]

[dev-dependencies]
serde_json = "1"
bincode = "1"
criterion = { version = "0.5", features = ["html_reports"] }

[[bench]]
name = "vm_bench"
harness = false

[[bench]]
name = "jit_vs_interp"
harness = false
required-features = ["jit"]

[[bench]]
name = "classic"
harness = false

[[bench]]
name = "jit_crossover"
harness = false
required-features = ["jit"]

[[bench]]
name = "jit_trace"
harness = false
required-features = ["jit"]

[[bench]]
name = "jit_disk_cache"
harness = false
required-features = ["jit-disk-cache"]
