[package]
name = "luna-core"
description = "Pure-Rust Lua runtime (interpreter only, zero third-party dependencies). The JIT-equipped variant lives in the `luna-jit` crate."
version.workspace = true
edition.workspace = true
rust-version.workspace = true
authors.workspace = true
license.workspace = true
repository.workspace = true
keywords.workspace = true
categories.workspace = true
readme = "../../README.md"

[lib]
# Same shape as the v1.0 root crate so embedders can swap `luna` →
# `luna-core` without re-evaluating their linkage model. cdylib +
# staticlib live in the `luna` crate (capi side); luna-core stays
# `rlib`-only — embedders that need a C ABI bring in `luna`.
crate-type = ["rlib"]

[lints]
workspace = true

[features]
# Default: no features. Vm stays !Send + !Sync (the v1.0/v1.1 default).
default = []
# v1.3 Phase SS-B: opt-in cross-thread `SendVm` wrapper. Lights up
# `luna_core::vm::SendVm`, an `Arc<UnsafeCell<Vm>> + Arc<RwLock<()>>`
# newtype that is `Send` at the type level and serializes access at
# runtime. Interp-only at v1.3 ship (JIT-aware SendVm is a post-v1.3
# polish item — see `.dev/rfcs/v1.3-rfc-send-arc.md`). Default-feature
# builds (no feature) keep `Vm` `!Send + !Sync` and bit-identical with
# the v1.2 baseline. luna-core 0-dep contract preserved (Arc, UnsafeCell,
# RwLock are all stdlib).
send = []

[dependencies]
# v1.1 F1 acceptance: this list must remain empty so
# `cargo tree -p luna-core --prefix none | grep -cE " v[0-9]"` == 1.

[dev-dependencies]
# v2.0 Phase 5 Track MM (memory budget) — `dhat` is a dev-only heap
# profiler used by the `mem_baseline` bench. It is gated to
# `[dev-dependencies]` so prod `cargo tree -p luna-core` still reports
# exactly 1 crate (luna-core itself), preserving the F1 0-dep contract.
# See `.dev/baselines/mem-2026-06-25/` for measurement output and
# `docs/contributing-mem.md` for the workflow.
dhat = "0.3"

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