# THIS FILE IS AUTOMATICALLY GENERATED BY CARGO
#
# When uploading crates to the registry Cargo will automatically
# "normalize" Cargo.toml files for maximal compatibility
# with all versions of Cargo and also rewrite `path` dependencies
# to registry (e.g., crates.io) dependencies.
#
# If you are reading this file be aware that the original Cargo.toml
# will likely look very different (and much more reasonable).
# See Cargo.toml.orig for the original contents.

[package]
edition = "2024"
name = "mbus-ffi"
version = "0.4.0"
authors = ["Raghava Ch <ch.raghava44@gmail.com>"]
build = false
autolib = false
autobins = false
autoexamples = false
autotests = false
autobenches = false
description = "Provides WASM and FFI functionalities for modbus-rs project"
homepage = "https://github.com/Raghava-Ch"
readme = "README.md"
keywords = [
    "modbus",
    "embedded",
    "no-std",
    "device",
]
categories = [
    "embedded",
    "no-std",
]
license = "GPL-3.0-only"
repository = "https://github.com/Raghava-Ch/modbus-rs"
resolver = "2"

[features]
coils = ["mbus-client/coils"]
default = []
diagnostics = ["mbus-client/diagnostics"]
discrete-inputs = ["mbus-client/discrete-inputs"]
fifo = ["mbus-client/fifo"]
file-record = ["mbus-client/file-record"]
full = [
    "coils",
    "registers",
    "discrete-inputs",
    "fifo",
    "file-record",
    "diagnostics",
]
registers = ["mbus-client/registers"]
wasm = [
    "dep:wasm-bindgen",
    "dep:js-sys",
    "dep:wasm-bindgen-futures",
    "dep:gloo-timers",
    "mbus-network/wasm",
    "mbus-serial/wasm",
]

[lib]
name = "mbus_ffi"
crate-type = [
    "cdylib",
    "rlib",
]
path = "src/lib.rs"

[[test]]
name = "wasm_e2e"
path = "tests/wasm_e2e.rs"

[dependencies.gloo-timers]
version = "0.3"
features = ["futures"]
optional = true

[dependencies.heapless]
version = "0.8.0"

[dependencies.js-sys]
version = "0.3"
optional = true

[dependencies.mbus-client]
version = "0.4.0"

[dependencies.mbus-core]
version = "0.4.0"

[dependencies.mbus-network]
version = "0.4.0"

[dependencies.mbus-serial]
version = "0.4.0"

[dependencies.wasm-bindgen]
version = "0.2"
optional = true

[dependencies.wasm-bindgen-futures]
version = "0.4"
optional = true

[target.'cfg(not(target_arch = "wasm32"))'.dependencies]

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

[target.'cfg(target_arch = "wasm32")'.dev-dependencies.wasm-bindgen-futures]
version = "0.4"

[target.'cfg(target_arch = "wasm32")'.dev-dependencies.wasm-bindgen-test]
version = "0.3"

[target.'cfg(target_arch = "wasm32")'.dev-dependencies.web-sys]
version = "0.3"
features = ["Window"]
