mqtt5-wasm 0.1.0 → 0.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -12,9 +12,17 @@ MQTT v5.0 WebAssembly client and broker for browser environments.
12
12
 
13
13
  ## Installation
14
14
 
15
+ ### npm (browser/bundler)
16
+
17
+ ```bash
18
+ npm install mqtt5-wasm
19
+ ```
20
+
21
+ ### Cargo (Rust)
22
+
15
23
  ```toml
16
24
  [dependencies]
17
- mqtt5-wasm = "0.10"
25
+ mqtt5-wasm = "0.1.2"
18
26
  ```
19
27
 
20
28
  Build with wasm-pack:
@@ -26,7 +34,7 @@ wasm-pack build --target web --features client,broker
26
34
  ## Usage
27
35
 
28
36
  ```javascript
29
- import init, { WasmMqttClient } from "./pkg/mqtt5_wasm.js";
37
+ import init, { WasmMqttClient } from "mqtt5-wasm";
30
38
 
31
39
  await init();
32
40
  const client = new WasmMqttClient("browser-client");
package/mqtt5_wasm.d.ts CHANGED
@@ -253,12 +253,12 @@ export interface InitOutput {
253
253
  readonly wasmwillmessage_willDelayInterval: (a: number) => number;
254
254
  readonly wasmwillmessage_messageExpiryInterval: (a: number) => number;
255
255
  readonly wasmwillmessage_set_messageExpiryInterval: (a: number, b: number) => void;
256
- readonly wasm_bindgen__convert__closures_____invoke__hacd56641ea4358f0: (a: number, b: number, c: any) => void;
257
- readonly wasm_bindgen__closure__destroy__h2a5cb8478cd1adb0: (a: number, b: number) => void;
258
- readonly wasm_bindgen__convert__closures_____invoke__h2d3fbbff27fe5544: (a: number, b: number, c: any) => void;
259
- readonly wasm_bindgen__closure__destroy__h07c691622f9242a9: (a: number, b: number) => void;
256
+ readonly wasm_bindgen__convert__closures_____invoke__h83490f8cd1f822be: (a: number, b: number, c: any) => void;
257
+ readonly wasm_bindgen__closure__destroy__h3e5175841145af54: (a: number, b: number) => void;
260
258
  readonly wasm_bindgen__convert__closures_____invoke__h4c33ce4d986075ed: (a: number, b: number) => void;
261
259
  readonly wasm_bindgen__closure__destroy__he3a6d52737a61d69: (a: number, b: number) => void;
260
+ readonly wasm_bindgen__convert__closures_____invoke__hacd56641ea4358f0: (a: number, b: number, c: any) => void;
261
+ readonly wasm_bindgen__closure__destroy__h2a5cb8478cd1adb0: (a: number, b: number) => void;
262
262
  readonly wasm_bindgen__convert__closures_____invoke__hbbb6f9316512cb4e: (a: number, b: number, c: any, d: any) => void;
263
263
  readonly __wbindgen_malloc: (a: number, b: number) => number;
264
264
  readonly __wbindgen_realloc: (a: number, b: number, c: number, d: number) => number;
package/mqtt5_wasm.js CHANGED
@@ -232,18 +232,18 @@ function passArray8ToWasm0(arg, malloc) {
232
232
  WASM_VECTOR_LEN = arg.length;
233
233
  return ptr;
234
234
  }
235
- function wasm_bindgen__convert__closures_____invoke__hacd56641ea4358f0(arg0, arg1, arg2) {
236
- wasm.wasm_bindgen__convert__closures_____invoke__hacd56641ea4358f0(arg0, arg1, arg2);
237
- }
238
-
239
- function wasm_bindgen__convert__closures_____invoke__h2d3fbbff27fe5544(arg0, arg1, arg2) {
240
- wasm.wasm_bindgen__convert__closures_____invoke__h2d3fbbff27fe5544(arg0, arg1, arg2);
235
+ function wasm_bindgen__convert__closures_____invoke__h83490f8cd1f822be(arg0, arg1, arg2) {
236
+ wasm.wasm_bindgen__convert__closures_____invoke__h83490f8cd1f822be(arg0, arg1, arg2);
241
237
  }
242
238
 
243
239
  function wasm_bindgen__convert__closures_____invoke__h4c33ce4d986075ed(arg0, arg1) {
244
240
  wasm.wasm_bindgen__convert__closures_____invoke__h4c33ce4d986075ed(arg0, arg1);
245
241
  }
246
242
 
243
+ function wasm_bindgen__convert__closures_____invoke__hacd56641ea4358f0(arg0, arg1, arg2) {
244
+ wasm.wasm_bindgen__convert__closures_____invoke__hacd56641ea4358f0(arg0, arg1, arg2);
245
+ }
246
+
247
247
  function wasm_bindgen__convert__closures_____invoke__hbbb6f9316512cb4e(arg0, arg1, arg2, arg3) {
248
248
  wasm.wasm_bindgen__convert__closures_____invoke__hbbb6f9316512cb4e(arg0, arg1, arg2, arg3);
249
249
  }
@@ -1613,12 +1613,12 @@ function __wbg_get_imports() {
1613
1613
  };
1614
1614
  imports.wbg.__wbindgen_cast_841ad4dc62ebec90 = function(arg0, arg1) {
1615
1615
  // Cast intrinsic for `Closure(Closure { dtor_idx: 2, function: Function { arguments: [NamedExternref("CloseEvent")], shim_idx: 3, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
1616
- const ret = makeMutClosure(arg0, arg1, wasm.wasm_bindgen__closure__destroy__h07c691622f9242a9, wasm_bindgen__convert__closures_____invoke__h2d3fbbff27fe5544);
1616
+ const ret = makeMutClosure(arg0, arg1, wasm.wasm_bindgen__closure__destroy__h3e5175841145af54, wasm_bindgen__convert__closures_____invoke__h83490f8cd1f822be);
1617
1617
  return ret;
1618
1618
  };
1619
1619
  imports.wbg.__wbindgen_cast_9a4d11962b71bb1d = function(arg0, arg1) {
1620
1620
  // Cast intrinsic for `Closure(Closure { dtor_idx: 2, function: Function { arguments: [NamedExternref("ErrorEvent")], shim_idx: 3, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
1621
- const ret = makeMutClosure(arg0, arg1, wasm.wasm_bindgen__closure__destroy__h07c691622f9242a9, wasm_bindgen__convert__closures_____invoke__h2d3fbbff27fe5544);
1621
+ const ret = makeMutClosure(arg0, arg1, wasm.wasm_bindgen__closure__destroy__h3e5175841145af54, wasm_bindgen__convert__closures_____invoke__h83490f8cd1f822be);
1622
1622
  return ret;
1623
1623
  };
1624
1624
  imports.wbg.__wbindgen_cast_9f5e1abc47e97f45 = function(arg0, arg1) {
@@ -1633,7 +1633,7 @@ function __wbg_get_imports() {
1633
1633
  };
1634
1634
  imports.wbg.__wbindgen_cast_eee2c0f90882ae61 = function(arg0, arg1) {
1635
1635
  // Cast intrinsic for `Closure(Closure { dtor_idx: 2, function: Function { arguments: [NamedExternref("MessageEvent")], shim_idx: 3, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
1636
- const ret = makeMutClosure(arg0, arg1, wasm.wasm_bindgen__closure__destroy__h07c691622f9242a9, wasm_bindgen__convert__closures_____invoke__h2d3fbbff27fe5544);
1636
+ const ret = makeMutClosure(arg0, arg1, wasm.wasm_bindgen__closure__destroy__h3e5175841145af54, wasm_bindgen__convert__closures_____invoke__h83490f8cd1f822be);
1637
1637
  return ret;
1638
1638
  };
1639
1639
  imports.wbg.__wbindgen_init_externref_table = function() {
Binary file
package/package.json CHANGED
@@ -5,11 +5,11 @@
5
5
  "fabriciobracht <fabricio@bracht.dev>"
6
6
  ],
7
7
  "description": "MQTT v5.0 WebAssembly client and broker for browser environments",
8
- "version": "0.1.0",
8
+ "version": "0.1.2",
9
9
  "license": "MIT OR Apache-2.0",
10
10
  "repository": {
11
11
  "type": "git",
12
- "url": "https://github.com/LabOverWire/mqtt-lib"
12
+ "url": "git+https://github.com/LabOverWire/mqtt-lib.git"
13
13
  },
14
14
  "files": [
15
15
  "mqtt5_wasm_bg.wasm",
@@ -28,4 +28,4 @@
28
28
  "iot",
29
29
  "pubsub"
30
30
  ]
31
- }
31
+ }