weida-native-full 0.0.0-stage → 0.1.0-alpha.19
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 +25 -2
- package/lib/index.d.ts +6 -0
- package/lib/index.js +24 -0
- package/package.json +39 -4
- package/prebuilds/darwin-arm64/libweida_full.dylib +0 -0
- package/prebuilds/linux-arm64/libweida_full.so +0 -0
- package/prebuilds/linux-x64/libweida_full.so +0 -0
- package/prebuilds/win32-x64/weida_full.dll +0 -0
package/README.md
CHANGED
|
@@ -1,3 +1,26 @@
|
|
|
1
|
-
#
|
|
1
|
+
# weida-native-full
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
`libweida_full`: [weida](https://weida.doodleshnookie.net/) and every protocol library (mqtt,
|
|
4
|
+
amqp, nats, nng, zmq, http) in one native library, with no JavaScript but the path to it.
|
|
5
|
+
|
|
6
|
+
You do not use this package directly. Installed beside `weida` and the protocol packages
|
|
7
|
+
(`weida-mqtt`, `weida-amqp`, ...), at exactly their version, it makes all of them open this one
|
|
8
|
+
library instead of their own bundled copies, so they run in one process over one library. A copy
|
|
9
|
+
at another version is ignored.
|
|
10
|
+
|
|
11
|
+
```sh
|
|
12
|
+
npm install weida weida-mqtt weida-native-full
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
```js
|
|
16
|
+
import { libraryPath, version } from "weida-native-full";
|
|
17
|
+
libraryPath(); // absolute path of libweida_full for this platform
|
|
18
|
+
version; // the version the library reports
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
The package carries `libweida_full` for Linux x64 and arm64 (glibc), macOS on Apple silicon and
|
|
22
|
+
Windows x64, so installing it needs no Rust toolchain and no compiler.
|
|
23
|
+
|
|
24
|
+
## License
|
|
25
|
+
|
|
26
|
+
MIT OR Apache-2.0, at your option.
|
package/lib/index.d.ts
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/** The absolute path of this platform's libweida_full inside this package. */
|
|
2
|
+
export function libraryPath(): string;
|
|
3
|
+
|
|
4
|
+
/** The package's version: the workspace version libweida_full reports, and
|
|
5
|
+
* the version a weida package must have to open it. */
|
|
6
|
+
export const version: string;
|
package/lib/index.js
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
// libweida_full, weida and every protocol library (mqtt, amqp, nats, nng,
|
|
2
|
+
// zmq, http) in one native library, with no JavaScript but the path to it.
|
|
3
|
+
// The loader of each weida package (crates/js/shared/lib/load.js) opens it
|
|
4
|
+
// instead of the package's own library when this package resolves from there
|
|
5
|
+
// at exactly that package's version. CommonJS, so that loader reads it with a
|
|
6
|
+
// synchronous require.
|
|
7
|
+
"use strict";
|
|
8
|
+
|
|
9
|
+
const { join } = require("node:path");
|
|
10
|
+
const { version } = require("../package.json");
|
|
11
|
+
|
|
12
|
+
const file =
|
|
13
|
+
process.platform === "win32"
|
|
14
|
+
? "weida_full.dll"
|
|
15
|
+
: process.platform === "darwin"
|
|
16
|
+
? "libweida_full.dylib"
|
|
17
|
+
: "libweida_full.so";
|
|
18
|
+
|
|
19
|
+
/** The absolute path of this platform's libweida_full inside this package. */
|
|
20
|
+
function libraryPath() {
|
|
21
|
+
return join(__dirname, "..", "prebuilds", `${process.platform}-${process.arch}`, file);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
module.exports = { libraryPath, version };
|
package/package.json
CHANGED
|
@@ -1,6 +1,41 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "weida-native-full",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
|
|
3
|
+
"version": "0.1.0-alpha.19",
|
|
4
|
+
"description": "libweida_full: weida and every protocol library in one native library, shared by the weida packages",
|
|
5
|
+
"license": "MIT OR Apache-2.0",
|
|
6
|
+
"repository": {
|
|
7
|
+
"type": "git",
|
|
8
|
+
"url": "git+https://github.com/tuco86/weida.git",
|
|
9
|
+
"directory": "crates/js/weida-native-full"
|
|
10
|
+
},
|
|
11
|
+
"homepage": "https://weida.doodleshnookie.net",
|
|
12
|
+
"keywords": [
|
|
13
|
+
"messaging",
|
|
14
|
+
"quic",
|
|
15
|
+
"mqtt",
|
|
16
|
+
"amqp",
|
|
17
|
+
"nats",
|
|
18
|
+
"nng",
|
|
19
|
+
"zeromq",
|
|
20
|
+
"http"
|
|
21
|
+
],
|
|
22
|
+
"type": "commonjs",
|
|
23
|
+
"exports": {
|
|
24
|
+
".": {
|
|
25
|
+
"types": "./lib/index.d.ts",
|
|
26
|
+
"default": "./lib/index.js"
|
|
27
|
+
},
|
|
28
|
+
"./package.json": "./package.json"
|
|
29
|
+
},
|
|
30
|
+
"types": "./lib/index.d.ts",
|
|
31
|
+
"files": [
|
|
32
|
+
"lib",
|
|
33
|
+
"prebuilds"
|
|
34
|
+
],
|
|
35
|
+
"publishConfig": {
|
|
36
|
+
"registry": "https://registry.npmjs.org/"
|
|
37
|
+
},
|
|
38
|
+
"engines": {
|
|
39
|
+
"node": ">=20"
|
|
40
|
+
}
|
|
41
|
+
}
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|