[package]
name = "asmkit-rs"
version = "0.3.0"
edition = "2024"
license = "MIT OR Apache-2.0"
readme = "README.md"
description = "Portable assembler toolkit: decoding and encoding of various architectures"
repository = "https://codeberg.org/playXE/asmkit"
keywords = ["assembler", "asm", "jit", "riscv", "x86"]

[lib]
name = "asmkit"

[dependencies]
smallvec = "1.13"
libc = { version = "0.2.162", optional = true, default-features = false }
cfgenius = "0.1"
intrusive-collections = "0.9"
errno = { version = "0.3.9", optional = true, default-features = false }
paste = "1.0"
num-traits = { version = "0.2.19", default-features = false }
bitflags = "2.11.0"

[target.'cfg(target_arch="riscv64")'.dependencies]
wasmtime-jit-icache-coherence = { version = "26.0.1", optional = true }
[features]
default = ["x86", "riscv", "aarch64", "jit"]
x86 = []
riscv = []
aarch64 = []
jit = ["wasmtime-jit-icache-coherence", "libc", "errno"]
# Dynamic instruction construction API with runtime operand-type checking.
x86-dyn = ["x86"]
# Intel-syntax text assembler that parses mnemonics/operands and emits code.
# Implies x86-dyn.
x86-asm = ["x86-dyn"]


[dev-dependencies]
criterion = { version = "0.5", features = ["html_reports"] }
iced-x86 = { version = "1.21", features = ["code_asm"] }
capstone = "0.14.0"

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


[profile.release]
panic = "abort"
