mod client;
mod error;
pub mod platform;
mod types;
mod websocket;
#[cfg(target_arch = "wasm32")]
mod js_transport;
#[cfg(target_arch = "wasm32")]
mod wasm_interface;
pub use client::MqttClient;
pub use error::{Error, Result};
pub use types::*;
pub use websocket::{UnderlyingLayerCommand, UnderlyingLayerEvent, UnderlyingLayerInterface};
#[cfg(target_arch = "wasm32")]
pub mod wasm {
pub use crate::js_transport::{create_client_with_js_transport, JsTransport};
pub use crate::wasm_interface::{
WasmMqttClient, WasmMqttConfig, WasmMqttPacket, WasmPacketType,
};
pub use crate::{MqttClient, MqttConfig};
}
pub mod mqtt;
#[cfg(target_arch = "wasm32")]
use wasm_bindgen::prelude::*;
#[cfg(target_arch = "wasm32")]
#[wasm_bindgen(start)]
pub fn init() {
console_error_panic_hook::set_once();
}