hara-native 0.1.20

HAL-free native host runtime and package launcher for Hara
Documentation
[package]
name = "hara-native"
version = "0.1.20"
edition = "2021"
description = "HAL-free native host runtime and package launcher for Hara"
license = "Apache-2.0"
rust-version = "1.78"
repository = "https://github.com/hara-lang/hara-native"
homepage = "https://www.hara-lang.org"
documentation = "https://github.com/hara-lang/hara-native#readme"
autobins = false
autotests = false
autoexamples = false
autobenches = false
build = "build.rs"
include = [
  "Cargo.lock",
  "Cargo.toml",
  "assets/**",
  "build.rs",
  "clippy.toml",
  "examples/**",
  "resources/**",
  "specs/**",
  "scripts/**",
  "src/**",
  "tests/**",
  "web/**",
]

[workspace]
members = [
  ".",
  "crates/abi",
  "crates/compiler",
  "crates/hta-codec",
  "crates/protocol-macros",
  "crates/raw",
  "crates/runtime",
  "crates/vm-runtime",
]
default-members = ["."]
resolver = "2"

[lib]
crate-type = ["cdylib", "rlib"]
# The released crate owns the native runtime source directly.  The separate
# workspace runtime package remains an internal compatibility/test seam, but
# must not be part of the published dependency graph.
path = "src/runtime_lib.rs"
test = false

[features]
# The shared instrumentation hub is always present. The default native runtime
# also compiles the copy-only HBC probe seam; ordinary Machine::run still takes
# the unchanged no-probe path and performs no event or projection work.
default = [
  "bytecode-vm",
  "bytecode-instrumentation",
  "browser-wasm",
  "direct-native",
]
evaluation-journal = []
dev-trace = ["evaluation-journal"]
halc-encoder = []
hir-encoder = ["halc-encoder"]
bytecode-vm = []
bytecode-instrumentation = ["bytecode-vm"]
bytecode-observation = ["bytecode-vm"]
code-vm-conformance = ["bytecode-observation", "halc-encoder", "evaluation-journal"]
raw-wasm = []
browser-wasm = ["getrandom/js"]
tracing-jit = ["bytecode-vm"]
native-jit = ["tracing-jit"]
direct-native = ["native-jit"]
whole-wasm = ["bytecode-vm"]
# Structured Evaluation Journal. Keep this opt-in so embedded and production
# builds do not carry collectors or journal storage.
# Existing optional encoder gate (declared here so Cargo can validate it).
# The staged bytecode VM is enabled by the main crate's default feature set.
# Entry points remain gated so compiler-free and feature-minimal crates can
# consume the shared VM substrate without enabling the compiler surface.
# Compact counters, events and one-boundary scalar probes. Ordinary
# Machine::run remains unchanged and no portable projection is materialized
# until the shared hub matches a registration.
# Opt-in bounded snapshots and compatibility one-boundary stepping for
# Hodos/code.vm. New instrumentation probes do not depend on these eager
# before/after snapshots.
# Production-generated interpreter/HALC/bytecode corpus and report.
# Shared VM source can be compiled into a plain-C Wasm facade without the
# browser-only wasm-bindgen session wrapper. Normal native-browser builds keep it.

[profile.browser-release]
inherits = "release"
opt-level = "z"
lto = true
codegen-units = 1
panic = "abort"
strip = "symbols"

[dependencies]
hara-protocol-macros = { version = "0.1.20", path = "crates/protocol-macros" }
wasm-bindgen = "0.2"
inventory = "0.3"
md5 = "0.8"
uuid = "1.24"
sha2 = "0.10"
hmac = "0.12"
regex = "1.11"
serde_json = "1.0"
getrandom = { version = "0.2", features = ["js"] }
ed25519-dalek = "2.1"
x25519-dalek = { version = "2.0", features = ["static_secrets"] }
p256 = { version = "0.13", features = ["ecdh", "ecdsa"] }
num-bigint = "0.4"
num-integer = "0.1"
num-traits = "0.2"
semver = "1.0"
hara-abi = { version = "0.1.20", path = "crates/abi" }
wasm-encoder = "0.41.2"
zeroize = "1.8"

[target.'cfg(target_arch = "wasm32")'.dependencies]
console_error_panic_hook = "0.1"
js-sys = "0.3"

[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
russh = "0.62.7"
russh-sftp = "2.4.0"
tokio = { version = "1.53", features = ["io-util", "net", "rt", "sync", "time"] }
wasmtime = { version = "18.0.0", default-features = false, features = ["cranelift", "runtime"] }
rustyline = "14.0.0"
home = "=0.5.9"
zip = { version = "2.2", default-features = false, features = ["deflate"] }

[target.'cfg(not(target_arch = "wasm32"))'.dev-dependencies]
rand = "0.10"

# Experimental bytecode VM benchmark driver (issue #195). The binary remains
# feature-gated so feature-minimal builds exclude it.
[[bin]]
name = "hara-native"
path = "src/bin/hara-native.rs"

[[bin]]
name = "hara-native-conformance-artifact"
path = "src/bin/hara-native-conformance-artifact.rs"

[[bin]]
name = "hara-native-benchmark"
path = "src/bin/hara-native-benchmark.rs"

[[bin]]
name = "hara-native-benchmark-worker"
path = "src/bin/hara-native-benchmark-worker.rs"
required-features = ["bytecode-vm"]

[[bin]]
name = "hara-native-language-conformance-artifact"
path = "src/bin/hara-native-language-conformance-artifact.rs"

[[bin]]
name = "hara-native-host-fixtures"
path = "src/bin/hara-native-host-fixtures.rs"
required-features = ["halc-encoder", "bytecode-vm"]

[[test]]
name = "native-test-registry"
path = "tests/native_test_registry.rs"

[[test]]
name = "native-command"
path = "tests/native_command.rs"

[[test]]
name = "native-lang"
path = "tests/native_lang.rs"

[dev-dependencies]
hara-hta = { version = "0.1.20", path = "crates/hta-codec" }