[package]
name = "aver-rt"
version = "0.4.2"
edition = "2024"
rust-version = "1.85"
license = "MIT"
description = "Shared Rust runtime pieces for Aver-generated programs"
readme = "README.md"
repository = "https://github.com/jasisz/aver"
homepage = "https://github.com/jasisz/aver"
documentation = "https://docs.rs/aver-rt"
keywords = ["aver", "runtime", "transpiler", "language", "codegen"]
categories = ["compilers"]

[lib]
name = "aver_rt"
path = "src/lib.rs"

[features]
default = []
http = ["dep:ureq"]
random = ["dep:rand"]
terminal = ["dep:crossterm"]

[package.metadata.docs.rs]
all-features = true

[dependencies]
crossterm = { version = "0.28", optional = true }
rand = { version = "0.9", optional = true }
ureq = { version = "2", optional = true }

# On wasm32-unknown-unknown, `rand` pulls in `getrandom`, which needs the
# `js` feature to use the browser's crypto API. Configuring getrandom
# here (not behind our own feature) keeps `random` usable on any target.
[target.'cfg(all(target_arch = "wasm32", target_os = "unknown"))'.dependencies]
getrandom = { version = "0.3", features = ["wasm_js"] }
