forge-kit 0.1.12

High-performance metadata manager and parser for ForgeScript.
Documentation
[package]
name = "forge-kit"
version = "0.1.12"
edition = "2024"
description = "High-performance metadata manager and parser for ForgeScript."
authors = ["Muhammad Bin Asim <muhammadbinasim471@gmail.com>"]
homepage = "https://forgekit.vercel.app"
repository = "https://github.com/EdexLabs/forgekit"
license = "GPL-3.0"

[lib]
crate-type = ["rlib", "cdylib"]

[dependencies]
# Core dependencies
dashmap = "6.1.0"
serde = { version = "1.0.228", features = ["derive"] }
serde_json = "1.0.149"
smallvec = "1.15.1"
regex = "1.10"

# WASM dependencies (optional)
wasm-bindgen = { version = "0.2", optional = true }
wasm-bindgen-futures = { version = "0.4", optional = true }
js-sys = { version = "0.3", optional = true }
serde-wasm-bindgen = { version = "0.6", optional = true }
console_error_panic_hook = { version = "0.1", optional = true }

[dependencies.web-sys]
version = "0.3"
optional = true
features = ["Window", "Storage"]

# Platform-specific dependencies
[target.'cfg(target_arch = "wasm32")'.dependencies]
# WASM uses the browser's Fetch API via reqwest
reqwest = { version = "0.12", default-features = false, features = ["json"] }

[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
reqwest = { version = "0.12", default-features = false, features = [
  "json",
  "rustls-tls",
] }
tokio = { version = "1.0", features = ["macros", "rt-multi-thread"] }

[features]
default = []
validation = []
panic_hook = ["console_error_panic_hook"]
wasm = [
  "wasm-bindgen",
  "wasm-bindgen-futures",
  "js-sys",
  "web-sys",
  "serde-wasm-bindgen",
  "panic_hook",
]

[dev-dependencies]
criterion = { version = "0.5", features = ["html_reports"] }
tokio-test = "0.4"

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

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

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

[profile.release]
opt-level = 3
lto = true        # Enable link-time optimization
codegen-units = 1
strip = true

[profile.bench]
opt-level = 3
lto = "fat"
codegen-units = 1
panic = "abort"
strip = true

[package.metadata.wasm-pack.profile.release]
# This explicitly tells the optimizer to allow these instructions
wasm-opt = ["-O", "--enable-bulk-memory", "--enable-nontrapping-float-to-int"]