@trylimbo/sdk-plugin-mxf 0.1.0-canary.100
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/gen/ffi/index.d.ts +822 -0
- package/gen/ffi/index.js +2686 -0
- package/gen/ffi/rolldown-runtime.js +43 -0
- package/package.json +56 -0
package/gen/ffi/index.js
ADDED
|
@@ -0,0 +1,2686 @@
|
|
|
1
|
+
import { a as __toESM, i as __require, n as __esmMin, r as __exportAll, t as __commonJSMin } from "./rolldown-runtime.js";
|
|
2
|
+
import path from "node:path";
|
|
3
|
+
import { fileURLToPath } from "node:url";
|
|
4
|
+
//#region ../../../../../node_modules/tsdown/esm-shims.js
|
|
5
|
+
var getFilename, getDirname, __dirname;
|
|
6
|
+
var init_esm_shims = __esmMin((() => {
|
|
7
|
+
getFilename = () => fileURLToPath(import.meta.url);
|
|
8
|
+
getDirname = () => path.dirname(getFilename());
|
|
9
|
+
__dirname = /* @__PURE__ */ getDirname();
|
|
10
|
+
}));
|
|
11
|
+
//#endregion
|
|
12
|
+
//#region ../../../../../node_modules/@ubjs/node/index.js
|
|
13
|
+
var require_node = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
14
|
+
init_esm_shims();
|
|
15
|
+
const { existsSync, readFileSync } = __require("fs");
|
|
16
|
+
const { join: join$1 } = __require("path");
|
|
17
|
+
const { platform, arch } = process;
|
|
18
|
+
let nativeBinding = null;
|
|
19
|
+
let localFileExisted = false;
|
|
20
|
+
let loadError = null;
|
|
21
|
+
function isMusl() {
|
|
22
|
+
if (!process.report || typeof process.report.getReport !== "function") try {
|
|
23
|
+
const lddPath = __require("child_process").execSync("which ldd").toString().trim();
|
|
24
|
+
return readFileSync(lddPath, "utf8").includes("musl");
|
|
25
|
+
} catch (e) {
|
|
26
|
+
return true;
|
|
27
|
+
}
|
|
28
|
+
else {
|
|
29
|
+
const { glibcVersionRuntime } = process.report.getReport().header;
|
|
30
|
+
return !glibcVersionRuntime;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
switch (platform) {
|
|
34
|
+
case "android":
|
|
35
|
+
switch (arch) {
|
|
36
|
+
case "arm64":
|
|
37
|
+
localFileExisted = existsSync(join$1(__dirname, "uniffi-runtime-napi.android-arm64.node"));
|
|
38
|
+
try {
|
|
39
|
+
if (localFileExisted) nativeBinding = __require("./uniffi-runtime-napi.android-arm64.node");
|
|
40
|
+
else nativeBinding = __require("@ubjs/node-android-arm64");
|
|
41
|
+
} catch (e) {
|
|
42
|
+
loadError = e;
|
|
43
|
+
}
|
|
44
|
+
break;
|
|
45
|
+
case "arm":
|
|
46
|
+
localFileExisted = existsSync(join$1(__dirname, "uniffi-runtime-napi.android-arm-eabi.node"));
|
|
47
|
+
try {
|
|
48
|
+
if (localFileExisted) nativeBinding = __require("./uniffi-runtime-napi.android-arm-eabi.node");
|
|
49
|
+
else nativeBinding = __require("@ubjs/node-android-arm-eabi");
|
|
50
|
+
} catch (e) {
|
|
51
|
+
loadError = e;
|
|
52
|
+
}
|
|
53
|
+
break;
|
|
54
|
+
default: throw new Error(`Unsupported architecture on Android ${arch}`);
|
|
55
|
+
}
|
|
56
|
+
break;
|
|
57
|
+
case "win32":
|
|
58
|
+
switch (arch) {
|
|
59
|
+
case "x64":
|
|
60
|
+
localFileExisted = existsSync(join$1(__dirname, "uniffi-runtime-napi.win32-x64-msvc.node"));
|
|
61
|
+
try {
|
|
62
|
+
if (localFileExisted) nativeBinding = __require("./uniffi-runtime-napi.win32-x64-msvc.node");
|
|
63
|
+
else nativeBinding = __require("@ubjs/node-win32-x64-msvc");
|
|
64
|
+
} catch (e) {
|
|
65
|
+
loadError = e;
|
|
66
|
+
}
|
|
67
|
+
break;
|
|
68
|
+
case "ia32":
|
|
69
|
+
localFileExisted = existsSync(join$1(__dirname, "uniffi-runtime-napi.win32-ia32-msvc.node"));
|
|
70
|
+
try {
|
|
71
|
+
if (localFileExisted) nativeBinding = __require("./uniffi-runtime-napi.win32-ia32-msvc.node");
|
|
72
|
+
else nativeBinding = __require("@ubjs/node-win32-ia32-msvc");
|
|
73
|
+
} catch (e) {
|
|
74
|
+
loadError = e;
|
|
75
|
+
}
|
|
76
|
+
break;
|
|
77
|
+
case "arm64":
|
|
78
|
+
localFileExisted = existsSync(join$1(__dirname, "uniffi-runtime-napi.win32-arm64-msvc.node"));
|
|
79
|
+
try {
|
|
80
|
+
if (localFileExisted) nativeBinding = __require("./uniffi-runtime-napi.win32-arm64-msvc.node");
|
|
81
|
+
else nativeBinding = __require("@ubjs/node-win32-arm64-msvc");
|
|
82
|
+
} catch (e) {
|
|
83
|
+
loadError = e;
|
|
84
|
+
}
|
|
85
|
+
break;
|
|
86
|
+
default: throw new Error(`Unsupported architecture on Windows: ${arch}`);
|
|
87
|
+
}
|
|
88
|
+
break;
|
|
89
|
+
case "darwin":
|
|
90
|
+
localFileExisted = existsSync(join$1(__dirname, "uniffi-runtime-napi.darwin-universal.node"));
|
|
91
|
+
try {
|
|
92
|
+
if (localFileExisted) nativeBinding = __require("./uniffi-runtime-napi.darwin-universal.node");
|
|
93
|
+
else nativeBinding = __require("@ubjs/node-darwin-universal");
|
|
94
|
+
break;
|
|
95
|
+
} catch {}
|
|
96
|
+
switch (arch) {
|
|
97
|
+
case "x64":
|
|
98
|
+
localFileExisted = existsSync(join$1(__dirname, "uniffi-runtime-napi.darwin-x64.node"));
|
|
99
|
+
try {
|
|
100
|
+
if (localFileExisted) nativeBinding = __require("./uniffi-runtime-napi.darwin-x64.node");
|
|
101
|
+
else nativeBinding = __require("@ubjs/node-darwin-x64");
|
|
102
|
+
} catch (e) {
|
|
103
|
+
loadError = e;
|
|
104
|
+
}
|
|
105
|
+
break;
|
|
106
|
+
case "arm64":
|
|
107
|
+
localFileExisted = existsSync(join$1(__dirname, "uniffi-runtime-napi.darwin-arm64.node"));
|
|
108
|
+
try {
|
|
109
|
+
if (localFileExisted) nativeBinding = __require("./uniffi-runtime-napi.darwin-arm64.node");
|
|
110
|
+
else nativeBinding = __require("@ubjs/node-darwin-arm64");
|
|
111
|
+
} catch (e) {
|
|
112
|
+
loadError = e;
|
|
113
|
+
}
|
|
114
|
+
break;
|
|
115
|
+
default: throw new Error(`Unsupported architecture on macOS: ${arch}`);
|
|
116
|
+
}
|
|
117
|
+
break;
|
|
118
|
+
case "freebsd":
|
|
119
|
+
if (arch !== "x64") throw new Error(`Unsupported architecture on FreeBSD: ${arch}`);
|
|
120
|
+
localFileExisted = existsSync(join$1(__dirname, "uniffi-runtime-napi.freebsd-x64.node"));
|
|
121
|
+
try {
|
|
122
|
+
if (localFileExisted) nativeBinding = __require("./uniffi-runtime-napi.freebsd-x64.node");
|
|
123
|
+
else nativeBinding = __require("@ubjs/node-freebsd-x64");
|
|
124
|
+
} catch (e) {
|
|
125
|
+
loadError = e;
|
|
126
|
+
}
|
|
127
|
+
break;
|
|
128
|
+
case "linux":
|
|
129
|
+
switch (arch) {
|
|
130
|
+
case "x64":
|
|
131
|
+
if (isMusl()) {
|
|
132
|
+
localFileExisted = existsSync(join$1(__dirname, "uniffi-runtime-napi.linux-x64-musl.node"));
|
|
133
|
+
try {
|
|
134
|
+
if (localFileExisted) nativeBinding = __require("./uniffi-runtime-napi.linux-x64-musl.node");
|
|
135
|
+
else nativeBinding = __require("@ubjs/node-linux-x64-musl");
|
|
136
|
+
} catch (e) {
|
|
137
|
+
loadError = e;
|
|
138
|
+
}
|
|
139
|
+
} else {
|
|
140
|
+
localFileExisted = existsSync(join$1(__dirname, "uniffi-runtime-napi.linux-x64-gnu.node"));
|
|
141
|
+
try {
|
|
142
|
+
if (localFileExisted) nativeBinding = __require("./uniffi-runtime-napi.linux-x64-gnu.node");
|
|
143
|
+
else nativeBinding = __require("@ubjs/node-linux-x64-gnu");
|
|
144
|
+
} catch (e) {
|
|
145
|
+
loadError = e;
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
break;
|
|
149
|
+
case "arm64":
|
|
150
|
+
if (isMusl()) {
|
|
151
|
+
localFileExisted = existsSync(join$1(__dirname, "uniffi-runtime-napi.linux-arm64-musl.node"));
|
|
152
|
+
try {
|
|
153
|
+
if (localFileExisted) nativeBinding = __require("./uniffi-runtime-napi.linux-arm64-musl.node");
|
|
154
|
+
else nativeBinding = __require("@ubjs/node-linux-arm64-musl");
|
|
155
|
+
} catch (e) {
|
|
156
|
+
loadError = e;
|
|
157
|
+
}
|
|
158
|
+
} else {
|
|
159
|
+
localFileExisted = existsSync(join$1(__dirname, "uniffi-runtime-napi.linux-arm64-gnu.node"));
|
|
160
|
+
try {
|
|
161
|
+
if (localFileExisted) nativeBinding = __require("./uniffi-runtime-napi.linux-arm64-gnu.node");
|
|
162
|
+
else nativeBinding = __require("@ubjs/node-linux-arm64-gnu");
|
|
163
|
+
} catch (e) {
|
|
164
|
+
loadError = e;
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
break;
|
|
168
|
+
case "arm":
|
|
169
|
+
if (isMusl()) {
|
|
170
|
+
localFileExisted = existsSync(join$1(__dirname, "uniffi-runtime-napi.linux-arm-musleabihf.node"));
|
|
171
|
+
try {
|
|
172
|
+
if (localFileExisted) nativeBinding = __require("./uniffi-runtime-napi.linux-arm-musleabihf.node");
|
|
173
|
+
else nativeBinding = __require("@ubjs/node-linux-arm-musleabihf");
|
|
174
|
+
} catch (e) {
|
|
175
|
+
loadError = e;
|
|
176
|
+
}
|
|
177
|
+
} else {
|
|
178
|
+
localFileExisted = existsSync(join$1(__dirname, "uniffi-runtime-napi.linux-arm-gnueabihf.node"));
|
|
179
|
+
try {
|
|
180
|
+
if (localFileExisted) nativeBinding = __require("./uniffi-runtime-napi.linux-arm-gnueabihf.node");
|
|
181
|
+
else nativeBinding = __require("@ubjs/node-linux-arm-gnueabihf");
|
|
182
|
+
} catch (e) {
|
|
183
|
+
loadError = e;
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
break;
|
|
187
|
+
case "riscv64":
|
|
188
|
+
if (isMusl()) {
|
|
189
|
+
localFileExisted = existsSync(join$1(__dirname, "uniffi-runtime-napi.linux-riscv64-musl.node"));
|
|
190
|
+
try {
|
|
191
|
+
if (localFileExisted) nativeBinding = __require("./uniffi-runtime-napi.linux-riscv64-musl.node");
|
|
192
|
+
else nativeBinding = __require("@ubjs/node-linux-riscv64-musl");
|
|
193
|
+
} catch (e) {
|
|
194
|
+
loadError = e;
|
|
195
|
+
}
|
|
196
|
+
} else {
|
|
197
|
+
localFileExisted = existsSync(join$1(__dirname, "uniffi-runtime-napi.linux-riscv64-gnu.node"));
|
|
198
|
+
try {
|
|
199
|
+
if (localFileExisted) nativeBinding = __require("./uniffi-runtime-napi.linux-riscv64-gnu.node");
|
|
200
|
+
else nativeBinding = __require("@ubjs/node-linux-riscv64-gnu");
|
|
201
|
+
} catch (e) {
|
|
202
|
+
loadError = e;
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
break;
|
|
206
|
+
case "s390x":
|
|
207
|
+
localFileExisted = existsSync(join$1(__dirname, "uniffi-runtime-napi.linux-s390x-gnu.node"));
|
|
208
|
+
try {
|
|
209
|
+
if (localFileExisted) nativeBinding = __require("./uniffi-runtime-napi.linux-s390x-gnu.node");
|
|
210
|
+
else nativeBinding = __require("@ubjs/node-linux-s390x-gnu");
|
|
211
|
+
} catch (e) {
|
|
212
|
+
loadError = e;
|
|
213
|
+
}
|
|
214
|
+
break;
|
|
215
|
+
default: throw new Error(`Unsupported architecture on Linux: ${arch}`);
|
|
216
|
+
}
|
|
217
|
+
break;
|
|
218
|
+
default: throw new Error(`Unsupported OS: ${platform}, architecture: ${arch}`);
|
|
219
|
+
}
|
|
220
|
+
if (!nativeBinding) {
|
|
221
|
+
if (loadError) throw loadError;
|
|
222
|
+
throw new Error(`Failed to load native binding`);
|
|
223
|
+
}
|
|
224
|
+
const { UniffiNativeModule } = nativeBinding;
|
|
225
|
+
module.exports.UniffiNativeModule = UniffiNativeModule;
|
|
226
|
+
}));
|
|
227
|
+
//#endregion
|
|
228
|
+
//#region ../../../../../node_modules/@ubjs/node/typescript/dist/resolve-lib.js
|
|
229
|
+
var require_resolve_lib = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
230
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
231
|
+
exports.ResolveLibPathError = void 0;
|
|
232
|
+
exports.detectTripleForTesting = detectTripleForTesting;
|
|
233
|
+
exports.resolveLibPath = resolveLibPath;
|
|
234
|
+
exports.setDetectTripleForTesting = setDetectTripleForTesting;
|
|
235
|
+
const node_fs_1 = __require("node:fs");
|
|
236
|
+
const node_module_1 = __require("node:module");
|
|
237
|
+
const node_path_1 = __require("node:path");
|
|
238
|
+
const node_url_1 = __require("node:url");
|
|
239
|
+
function detectNodeTriple(proc) {
|
|
240
|
+
const { platform, arch } = proc;
|
|
241
|
+
if (platform === "darwin" && arch === "arm64") return "darwin-arm64";
|
|
242
|
+
if (platform === "darwin" && arch === "x64") return "darwin-x64";
|
|
243
|
+
if (platform === "linux" && (arch === "x64" || arch === "arm64")) return `linux-${arch}-${proc.report?.getReport()?.header?.glibcVersionRuntime !== void 0 ? "gnu" : "musl"}`;
|
|
244
|
+
if (platform === "win32" && (arch === "x64" || arch === "arm64")) return `win32-${arch}-msvc`;
|
|
245
|
+
throw new Error(`Unsupported platform/arch combination: ${platform}/${arch}. Supported: darwin-{arm64,x64}, linux-{x64,arm64}-{gnu,musl}, win32-{x64,arm64}-msvc.`);
|
|
246
|
+
}
|
|
247
|
+
function detectCargoTriple(proc) {
|
|
248
|
+
const { platform, arch } = proc;
|
|
249
|
+
const llvmArch = {
|
|
250
|
+
arm64: "aarch64",
|
|
251
|
+
x64: "x86_64"
|
|
252
|
+
}[arch];
|
|
253
|
+
if (llvmArch === void 0) throw new Error(`Unsupported platform/arch combination: ${platform}/${arch}. Supported arches: arm64, x64.`);
|
|
254
|
+
if (platform === "darwin") return `${llvmArch}-apple-darwin`;
|
|
255
|
+
if (platform === "linux") return `${llvmArch}-unknown-linux-${proc.report?.getReport()?.header?.glibcVersionRuntime !== void 0 ? "gnu" : "musl"}`;
|
|
256
|
+
if (platform === "win32") return `${llvmArch}-pc-windows-msvc`;
|
|
257
|
+
throw new Error(`Unsupported platform/arch combination: ${platform}/${arch}. Supported: darwin, linux, win32.`);
|
|
258
|
+
}
|
|
259
|
+
function detectTriple(proc, style) {
|
|
260
|
+
return style === "node" ? detectNodeTriple(proc) : detectCargoTriple(proc);
|
|
261
|
+
}
|
|
262
|
+
/** Test-only export. Do not use from production code. */
|
|
263
|
+
function detectTripleForTesting(proc, style = "cargo") {
|
|
264
|
+
return detectTriple(proc, style);
|
|
265
|
+
}
|
|
266
|
+
var ResolveLibPathError = class extends Error {
|
|
267
|
+
mode;
|
|
268
|
+
crateName;
|
|
269
|
+
attempted;
|
|
270
|
+
cause;
|
|
271
|
+
constructor(args) {
|
|
272
|
+
super(args.message);
|
|
273
|
+
this.name = "ResolveLibPathError";
|
|
274
|
+
this.mode = args.mode;
|
|
275
|
+
this.crateName = args.crateName;
|
|
276
|
+
this.attempted = args.attempted;
|
|
277
|
+
if (args.cause !== void 0) this.cause = args.cause;
|
|
278
|
+
}
|
|
279
|
+
};
|
|
280
|
+
exports.ResolveLibPathError = ResolveLibPathError;
|
|
281
|
+
function callerDir(callerUrl) {
|
|
282
|
+
const path = callerUrl.startsWith("file://") ? (0, node_url_1.fileURLToPath)(callerUrl) : callerUrl;
|
|
283
|
+
return (0, node_path_1.dirname)(path);
|
|
284
|
+
}
|
|
285
|
+
function libFileName(crateName, platform) {
|
|
286
|
+
if (platform === "win32") return `${crateName}.dll`;
|
|
287
|
+
return `lib${crateName}.${platform === "darwin" ? "dylib" : "so"}`;
|
|
288
|
+
}
|
|
289
|
+
function resolveLibPath(opts) {
|
|
290
|
+
if ("override" in opts && opts.override !== void 0) return resolveOverride(opts.crateName, opts.override);
|
|
291
|
+
if ("npmPackageBase" in opts && opts.npmPackageBase !== void 0) return resolveNpmPackage(opts.crateName, opts.callerUrl, opts.npmPackageBase, opts.tripleStyle ?? "cargo");
|
|
292
|
+
return resolveColocated(opts.crateName, opts.callerUrl);
|
|
293
|
+
}
|
|
294
|
+
function resolveColocated(crateName, callerUrl) {
|
|
295
|
+
const candidate = (0, node_path_1.join)(callerDir(callerUrl), libFileName(crateName, process.platform));
|
|
296
|
+
if (!(0, node_fs_1.existsSync)(candidate)) throw new ResolveLibPathError({
|
|
297
|
+
message: `Could not find lib for crate "${crateName}" colocated with caller. Looked for: ${candidate}.`,
|
|
298
|
+
mode: "colocated",
|
|
299
|
+
crateName,
|
|
300
|
+
attempted: [candidate]
|
|
301
|
+
});
|
|
302
|
+
return candidate;
|
|
303
|
+
}
|
|
304
|
+
function resolveOverride(crateName, path) {
|
|
305
|
+
if (!(0, node_path_1.isAbsolute)(path)) throw new ResolveLibPathError({
|
|
306
|
+
message: `Override path must be absolute; got "${path}".`,
|
|
307
|
+
mode: "override",
|
|
308
|
+
crateName,
|
|
309
|
+
attempted: [path]
|
|
310
|
+
});
|
|
311
|
+
if (!(0, node_fs_1.existsSync)(path)) throw new ResolveLibPathError({
|
|
312
|
+
message: `Override path "${path}" for crate "${crateName}" does not exist.`,
|
|
313
|
+
mode: "override",
|
|
314
|
+
crateName,
|
|
315
|
+
attempted: [path]
|
|
316
|
+
});
|
|
317
|
+
return path;
|
|
318
|
+
}
|
|
319
|
+
let _detectTripleImpl = (style) => detectTriple(process, style);
|
|
320
|
+
/** Test-only seam to override triple detection. Returns the previous impl. */
|
|
321
|
+
function setDetectTripleForTesting(fn) {
|
|
322
|
+
const prev = _detectTripleImpl;
|
|
323
|
+
_detectTripleImpl = fn;
|
|
324
|
+
return prev;
|
|
325
|
+
}
|
|
326
|
+
function resolveNpmPackage(crateName, callerUrl, npmPackageBase, tripleStyle) {
|
|
327
|
+
const triple = _detectTripleImpl(tripleStyle);
|
|
328
|
+
const pkgName = `${npmPackageBase}${triple}`;
|
|
329
|
+
const require_ = (0, node_module_1.createRequire)(callerUrl);
|
|
330
|
+
let pkgJsonPath;
|
|
331
|
+
try {
|
|
332
|
+
pkgJsonPath = require_.resolve(`${pkgName}/package.json`);
|
|
333
|
+
} catch (cause) {
|
|
334
|
+
throw new ResolveLibPathError({
|
|
335
|
+
message: `Could not find platform package for crate "${crateName}": tried "${pkgName}". Detected platform: ${triple}. Either the package is not installed (run npm install) or this platform is not in the published matrix.`,
|
|
336
|
+
mode: "npmPackageBase",
|
|
337
|
+
crateName,
|
|
338
|
+
attempted: [pkgName],
|
|
339
|
+
cause
|
|
340
|
+
});
|
|
341
|
+
}
|
|
342
|
+
const binaryPath = (0, node_path_1.join)((0, node_path_1.dirname)(pkgJsonPath), libFileName(crateName, process.platform));
|
|
343
|
+
if (!(0, node_fs_1.existsSync)(binaryPath)) throw new ResolveLibPathError({
|
|
344
|
+
message: `Platform package "${pkgName}" is installed but does not contain "${libFileName(crateName, process.platform)}" — package layout is malformed.`,
|
|
345
|
+
mode: "npmPackageBase",
|
|
346
|
+
crateName,
|
|
347
|
+
attempted: [binaryPath]
|
|
348
|
+
});
|
|
349
|
+
return binaryPath;
|
|
350
|
+
}
|
|
351
|
+
}));
|
|
352
|
+
//#endregion
|
|
353
|
+
//#region ../../../../../node_modules/@ubjs/core/dist/esm/symbols.js
|
|
354
|
+
var import_lib = /* @__PURE__ */ __toESM((/* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
355
|
+
const { copyFileSync, mkdtempSync, rmSync } = __require("node:fs");
|
|
356
|
+
const { tmpdir } = __require("node:os");
|
|
357
|
+
const { basename, dirname, join } = __require("node:path");
|
|
358
|
+
const { isMainThread, threadId } = __require("node:worker_threads");
|
|
359
|
+
const native = require_node();
|
|
360
|
+
const { resolveLibPath, ResolveLibPathError } = require_resolve_lib();
|
|
361
|
+
function perRealmCopy(source) {
|
|
362
|
+
const name = `.uniffi-realm-${process.pid}-${threadId}-${basename(source)}`;
|
|
363
|
+
const candidates = [() => ({ copy: join(dirname(source), name) }), () => {
|
|
364
|
+
const dir = mkdtempSync(join(tmpdir(), "uniffi-realm-"));
|
|
365
|
+
return {
|
|
366
|
+
copy: join(dir, basename(source)),
|
|
367
|
+
dir
|
|
368
|
+
};
|
|
369
|
+
}];
|
|
370
|
+
const failures = [];
|
|
371
|
+
for (const candidate of candidates) {
|
|
372
|
+
let copy;
|
|
373
|
+
let dir;
|
|
374
|
+
try {
|
|
375
|
+
({copy, dir} = candidate());
|
|
376
|
+
copyFileSync(source, copy);
|
|
377
|
+
} catch (cause) {
|
|
378
|
+
failures.push(`${copy ?? "(could not create a directory)"}: ${String(cause)}`);
|
|
379
|
+
continue;
|
|
380
|
+
}
|
|
381
|
+
const settled = copy;
|
|
382
|
+
const remove = () => {
|
|
383
|
+
try {
|
|
384
|
+
rmSync(settled, { force: true });
|
|
385
|
+
} catch {}
|
|
386
|
+
if (dir !== void 0) try {
|
|
387
|
+
rmSync(dir, {
|
|
388
|
+
recursive: true,
|
|
389
|
+
force: true
|
|
390
|
+
});
|
|
391
|
+
} catch {}
|
|
392
|
+
};
|
|
393
|
+
queueMicrotask(remove);
|
|
394
|
+
process.on("exit", remove);
|
|
395
|
+
return settled;
|
|
396
|
+
}
|
|
397
|
+
throw new Error(`uniffi: a worker thread needs its own copy of ${source}, and nowhere was writable.\n` + failures.map((failure) => ` tried ${failure}`).join("\n") + "\nMake the package directory writable or set TMPDIR to an executable writable directory.");
|
|
398
|
+
}
|
|
399
|
+
module.exports = {
|
|
400
|
+
...native,
|
|
401
|
+
resolveLibPath: isMainThread ? resolveLibPath : (options) => perRealmCopy(resolveLibPath(options)),
|
|
402
|
+
ResolveLibPathError,
|
|
403
|
+
FfiType: {
|
|
404
|
+
UInt8: { tag: "UInt8" },
|
|
405
|
+
Int8: { tag: "Int8" },
|
|
406
|
+
UInt16: { tag: "UInt16" },
|
|
407
|
+
Int16: { tag: "Int16" },
|
|
408
|
+
UInt32: { tag: "UInt32" },
|
|
409
|
+
Int32: { tag: "Int32" },
|
|
410
|
+
UInt64: { tag: "UInt64" },
|
|
411
|
+
Int64: { tag: "Int64" },
|
|
412
|
+
Float32: { tag: "Float32" },
|
|
413
|
+
Float64: { tag: "Float64" },
|
|
414
|
+
Handle: { tag: "Handle" },
|
|
415
|
+
RustBuffer: { tag: "RustBuffer" },
|
|
416
|
+
ForeignBytes: { tag: "ForeignBytes" },
|
|
417
|
+
RustCallStatus: { tag: "RustCallStatus" },
|
|
418
|
+
VoidPointer: { tag: "VoidPointer" },
|
|
419
|
+
Void: { tag: "Void" },
|
|
420
|
+
Callback: (name) => ({
|
|
421
|
+
tag: "Callback",
|
|
422
|
+
name
|
|
423
|
+
}),
|
|
424
|
+
Struct: (name) => ({
|
|
425
|
+
tag: "Struct",
|
|
426
|
+
name
|
|
427
|
+
}),
|
|
428
|
+
Reference: (inner) => ({
|
|
429
|
+
tag: "Reference",
|
|
430
|
+
inner
|
|
431
|
+
}),
|
|
432
|
+
MutReference: (inner) => ({
|
|
433
|
+
tag: "MutReference",
|
|
434
|
+
inner
|
|
435
|
+
})
|
|
436
|
+
}
|
|
437
|
+
};
|
|
438
|
+
})))());
|
|
439
|
+
/**
|
|
440
|
+
* A destructor guard object is created for every
|
|
441
|
+
* `interface` object.
|
|
442
|
+
*
|
|
443
|
+
* It corresponds to the `DestructibleObject` in C++, which
|
|
444
|
+
* uses a C++ destructor to simulate the JS garbage collector.
|
|
445
|
+
*
|
|
446
|
+
* The implementation is in {@link RustArcPtr.h}.
|
|
447
|
+
*/
|
|
448
|
+
const destructorGuardSymbol = Symbol.for("destructor");
|
|
449
|
+
/**
|
|
450
|
+
* The `bigint` pointer corresponding to the Rust memory address
|
|
451
|
+
* of the native peer.
|
|
452
|
+
*/
|
|
453
|
+
const pointerLiteralSymbol = Symbol.for("pointer");
|
|
454
|
+
/**
|
|
455
|
+
* The `string` name of the object, enum or error class.
|
|
456
|
+
*
|
|
457
|
+
* This drives the `instanceOf` method implementations.
|
|
458
|
+
*/
|
|
459
|
+
const uniffiTypeNameSymbol = Symbol.for("typeName");
|
|
460
|
+
//#endregion
|
|
461
|
+
//#region ../../../../../node_modules/@ubjs/core/dist/esm/errors.js
|
|
462
|
+
var UniffiError = class extends Error {
|
|
463
|
+
constructor(enumTypeName, variantName, message) {
|
|
464
|
+
super(createErrorMessage(enumTypeName, variantName, message));
|
|
465
|
+
}
|
|
466
|
+
static instanceOf(obj) {
|
|
467
|
+
return obj[uniffiTypeNameSymbol] !== void 0 && obj instanceof Error;
|
|
468
|
+
}
|
|
469
|
+
};
|
|
470
|
+
function createErrorMessage(typeName, variantName, message) {
|
|
471
|
+
const prefix = `${typeName}.${variantName}`;
|
|
472
|
+
if (message) return `${prefix}: ${message}`;
|
|
473
|
+
else return prefix;
|
|
474
|
+
}
|
|
475
|
+
const UniffiInternalError = (() => {
|
|
476
|
+
class NumberOverflow extends Error {
|
|
477
|
+
constructor() {
|
|
478
|
+
super("Cannot convert a large BigInt into a number");
|
|
479
|
+
}
|
|
480
|
+
}
|
|
481
|
+
class DateTimeOverflow extends Error {
|
|
482
|
+
constructor() {
|
|
483
|
+
super("Date overflowed passed maximum number of ms passed the epoch");
|
|
484
|
+
}
|
|
485
|
+
}
|
|
486
|
+
class BufferOverflow extends Error {
|
|
487
|
+
constructor() {
|
|
488
|
+
super("Reading the requested value would read past the end of the buffer");
|
|
489
|
+
}
|
|
490
|
+
}
|
|
491
|
+
class IncompleteData extends Error {
|
|
492
|
+
constructor() {
|
|
493
|
+
super("The buffer still has data after lifting its containing value");
|
|
494
|
+
}
|
|
495
|
+
}
|
|
496
|
+
class AbortError extends Error {
|
|
497
|
+
constructor() {
|
|
498
|
+
super("A Rust future was aborted");
|
|
499
|
+
this.name = "AbortError";
|
|
500
|
+
}
|
|
501
|
+
}
|
|
502
|
+
class UnexpectedEnumCase extends Error {
|
|
503
|
+
constructor() {
|
|
504
|
+
super("Raw enum value doesn't match any cases");
|
|
505
|
+
}
|
|
506
|
+
}
|
|
507
|
+
class UnexpectedNullPointer extends Error {
|
|
508
|
+
constructor() {
|
|
509
|
+
super("Raw pointer value was null");
|
|
510
|
+
}
|
|
511
|
+
}
|
|
512
|
+
class UnexpectedRustCallStatusCode extends Error {
|
|
513
|
+
constructor() {
|
|
514
|
+
super("Unexpected UniffiRustCallStatus code");
|
|
515
|
+
}
|
|
516
|
+
}
|
|
517
|
+
class UnexpectedRustCallError extends Error {
|
|
518
|
+
constructor() {
|
|
519
|
+
super("CALL_ERROR but no errorClass specified");
|
|
520
|
+
}
|
|
521
|
+
}
|
|
522
|
+
class UnexpectedStaleHandle extends Error {
|
|
523
|
+
constructor() {
|
|
524
|
+
super("The object is no longer in the handle map, likely because of a hot-reload");
|
|
525
|
+
}
|
|
526
|
+
}
|
|
527
|
+
class ContractVersionMismatch extends Error {
|
|
528
|
+
constructor(rustVersion, bindingsVersion) {
|
|
529
|
+
super(`Incompatible versions of uniffi were used to build the JS (${bindingsVersion}) from the Rust (${rustVersion})`);
|
|
530
|
+
}
|
|
531
|
+
}
|
|
532
|
+
class ApiChecksumMismatch extends Error {
|
|
533
|
+
constructor(func) {
|
|
534
|
+
super(`FFI function ${func} has a checksum mismatch; this may signify previously undetected incompatible Uniffi versions`);
|
|
535
|
+
}
|
|
536
|
+
}
|
|
537
|
+
class RustPanic extends Error {
|
|
538
|
+
constructor(message) {
|
|
539
|
+
super(message);
|
|
540
|
+
}
|
|
541
|
+
}
|
|
542
|
+
class Unimplemented extends Error {
|
|
543
|
+
constructor(message) {
|
|
544
|
+
super(message);
|
|
545
|
+
}
|
|
546
|
+
}
|
|
547
|
+
return {
|
|
548
|
+
ApiChecksumMismatch,
|
|
549
|
+
NumberOverflow,
|
|
550
|
+
DateTimeOverflow,
|
|
551
|
+
BufferOverflow,
|
|
552
|
+
ContractVersionMismatch,
|
|
553
|
+
IncompleteData,
|
|
554
|
+
AbortError,
|
|
555
|
+
UnexpectedEnumCase,
|
|
556
|
+
UnexpectedNullPointer,
|
|
557
|
+
UnexpectedRustCallStatusCode,
|
|
558
|
+
UnexpectedRustCallError,
|
|
559
|
+
UnexpectedStaleHandle,
|
|
560
|
+
RustPanic,
|
|
561
|
+
Unimplemented
|
|
562
|
+
};
|
|
563
|
+
})();
|
|
564
|
+
const emptyStringLifter = (bytes) => "An error occurred decoding a string";
|
|
565
|
+
var UniffiRustCaller = class {
|
|
566
|
+
statusConstructor;
|
|
567
|
+
constructor(statusConstructor) {
|
|
568
|
+
this.statusConstructor = statusConstructor;
|
|
569
|
+
}
|
|
570
|
+
rustCall(caller, liftString = emptyStringLifter) {
|
|
571
|
+
return this.makeRustCall(caller, liftString);
|
|
572
|
+
}
|
|
573
|
+
rustCallWithError(errorHandler, caller, liftString = emptyStringLifter) {
|
|
574
|
+
return this.makeRustCall(caller, liftString, errorHandler);
|
|
575
|
+
}
|
|
576
|
+
createCallStatus() {
|
|
577
|
+
return this.statusConstructor();
|
|
578
|
+
}
|
|
579
|
+
createErrorStatus(code, errorBuf) {
|
|
580
|
+
const status = this.statusConstructor();
|
|
581
|
+
status.code = code;
|
|
582
|
+
status.errorBuf = errorBuf;
|
|
583
|
+
return status;
|
|
584
|
+
}
|
|
585
|
+
makeRustCall(caller, liftString, errorHandler) {
|
|
586
|
+
const callStatus = this.statusConstructor();
|
|
587
|
+
let returnedVal = caller(callStatus);
|
|
588
|
+
uniffiCheckCallStatus(callStatus, liftString, errorHandler);
|
|
589
|
+
return returnedVal;
|
|
590
|
+
}
|
|
591
|
+
};
|
|
592
|
+
function uniffiCheckCallStatus(callStatus, liftString, errorHandler) {
|
|
593
|
+
switch (callStatus.code) {
|
|
594
|
+
case 0: return;
|
|
595
|
+
case 1: {
|
|
596
|
+
const errorBuf = callStatus.errorBuf;
|
|
597
|
+
if (errorBuf) {
|
|
598
|
+
if (errorHandler) throw errorHandler(errorBuf);
|
|
599
|
+
}
|
|
600
|
+
throw new UniffiInternalError.UnexpectedRustCallError();
|
|
601
|
+
}
|
|
602
|
+
case 2: {
|
|
603
|
+
const errorBuf = callStatus.errorBuf;
|
|
604
|
+
if (errorBuf) {
|
|
605
|
+
if (errorBuf.byteLength > 0) throw new UniffiInternalError.RustPanic(liftString(errorBuf));
|
|
606
|
+
}
|
|
607
|
+
throw new UniffiInternalError.RustPanic("Rust panic");
|
|
608
|
+
}
|
|
609
|
+
case 3: throw new UniffiInternalError.AbortError();
|
|
610
|
+
default: throw new UniffiInternalError.UnexpectedRustCallStatusCode();
|
|
611
|
+
}
|
|
612
|
+
}
|
|
613
|
+
//#endregion
|
|
614
|
+
//#region ../../../../../node_modules/@ubjs/core/dist/esm/handle-map.js
|
|
615
|
+
const defaultUniffiHandle = BigInt("0");
|
|
616
|
+
var UniffiHandleMap = class {
|
|
617
|
+
map = /* @__PURE__ */ new Map();
|
|
618
|
+
currentHandle = BigInt(1);
|
|
619
|
+
insert(value) {
|
|
620
|
+
const handle = this.currentHandle;
|
|
621
|
+
this.map.set(handle, value);
|
|
622
|
+
this.currentHandle += BigInt(2);
|
|
623
|
+
return handle;
|
|
624
|
+
}
|
|
625
|
+
get(handle) {
|
|
626
|
+
const obj = this.map.get(handle);
|
|
627
|
+
if (obj === void 0) throw new UniffiInternalError.UnexpectedStaleHandle();
|
|
628
|
+
return obj;
|
|
629
|
+
}
|
|
630
|
+
/**
|
|
631
|
+
* Creates a second handle pointing to the same object. Rust calls this (via
|
|
632
|
+
* `CallbackInterfaceClone`) when it clones an Arc holding a foreign-implemented
|
|
633
|
+
* trait object, so two Arc references can exist with independent lifetimes.
|
|
634
|
+
*
|
|
635
|
+
* This clones the *handle*, not the object itself. Both handles resolve to the
|
|
636
|
+
* same JS object reference, and removing either handle does not affect the other.
|
|
637
|
+
*/
|
|
638
|
+
clone(handle) {
|
|
639
|
+
const obj = this.map.get(handle);
|
|
640
|
+
if (obj === void 0) throw new UniffiInternalError.UnexpectedStaleHandle();
|
|
641
|
+
return this.insert(obj);
|
|
642
|
+
}
|
|
643
|
+
remove(handle) {
|
|
644
|
+
const obj = this.map.get(handle);
|
|
645
|
+
if (obj !== void 0) this.map.delete(handle);
|
|
646
|
+
return obj;
|
|
647
|
+
}
|
|
648
|
+
has(handle) {
|
|
649
|
+
return this.map.has(handle);
|
|
650
|
+
}
|
|
651
|
+
get size() {
|
|
652
|
+
return this.map.size;
|
|
653
|
+
}
|
|
654
|
+
};
|
|
655
|
+
//#endregion
|
|
656
|
+
//#region ../../../../../node_modules/@ubjs/core/dist/esm/async-callbacks.js
|
|
657
|
+
const UNIFFI_FOREIGN_FUTURE_HANDLE_MAP = new UniffiHandleMap();
|
|
658
|
+
function uniffiTraitInterfaceCallAsyncWithError(makeCall, handleSuccess, handleError, isErrorType, lowerError, lowerString, alloc) {
|
|
659
|
+
const settledHolder = { settled: false };
|
|
660
|
+
const abortController = new AbortController();
|
|
661
|
+
const promiseHelper = {
|
|
662
|
+
abortController,
|
|
663
|
+
settledHolder,
|
|
664
|
+
promise: makeCall(abortController.signal).finally(() => settledHolder.settled = true).then(handleSuccess, (error) => {
|
|
665
|
+
let message = error.message ? error.message : error.toString();
|
|
666
|
+
if (isErrorType(error)) try {
|
|
667
|
+
handleError(1, lowerError(error, alloc));
|
|
668
|
+
return;
|
|
669
|
+
} catch (e) {
|
|
670
|
+
message = `Error handling error "${e}", originally: "${message}"`;
|
|
671
|
+
}
|
|
672
|
+
handleError(2, lowerString(message, alloc));
|
|
673
|
+
})
|
|
674
|
+
};
|
|
675
|
+
return {
|
|
676
|
+
handle: UNIFFI_FOREIGN_FUTURE_HANDLE_MAP.insert(promiseHelper),
|
|
677
|
+
free: uniffiForeignFutureFree
|
|
678
|
+
};
|
|
679
|
+
}
|
|
680
|
+
function uniffiForeignFutureFree(handle) {
|
|
681
|
+
const helper = UNIFFI_FOREIGN_FUTURE_HANDLE_MAP.remove(handle);
|
|
682
|
+
if (helper?.settledHolder.settled === false) helper.abortController.abort();
|
|
683
|
+
}
|
|
684
|
+
//#endregion
|
|
685
|
+
//#region ../../../../../node_modules/@ubjs/core/dist/esm/async-rust-call.js
|
|
686
|
+
const UNIFFI_RUST_FUTURE_POLL_READY = 0;
|
|
687
|
+
/**
|
|
688
|
+
* This method calls an asynchronous method on the Rust side.
|
|
689
|
+
*
|
|
690
|
+
* It manages the impedence mismatch between JS promises and Rust futures.
|
|
691
|
+
*
|
|
692
|
+
* @param rustFutureFunc calls the Rust client side code. Uniffi machinery gives back
|
|
693
|
+
* a handle to the Rust future.
|
|
694
|
+
* @param pollFunc is then called periodically. This sends a JS callback, and the RustFuture handle
|
|
695
|
+
* to Rust. In practice, this poll is implemented as a Promise, which the callback resolves.
|
|
696
|
+
* @param cancelFunc is currently unexposed to client code.
|
|
697
|
+
* @param completeFunc once the Rust future polls as complete, the completeFunc is called to get
|
|
698
|
+
* the result and any errors that were encountered.
|
|
699
|
+
* @param freeFunc is finally called with the Rust future handle to drop the now complete Rust
|
|
700
|
+
* future.
|
|
701
|
+
*/
|
|
702
|
+
async function uniffiRustCallAsync(rustCaller, rustFutureFunc, pollFunc, cancelFunc, completeFunc, freeFunc, liftFunc, liftString, asyncOpts, errorHandler) {
|
|
703
|
+
if (asyncOpts?.signal.aborted === true) return Promise.reject(new UniffiInternalError.AbortError());
|
|
704
|
+
const rustFuture = rustFutureFunc();
|
|
705
|
+
const abortFunc = createAbortFunction(rustFuture, cancelFunc);
|
|
706
|
+
asyncOpts?.signal.addEventListener("abort", abortFunc);
|
|
707
|
+
const keepAlive = typeof setTimeout === "function" ? setTimeout(() => {}, 2147483647) : void 0;
|
|
708
|
+
try {
|
|
709
|
+
let pollResult;
|
|
710
|
+
do
|
|
711
|
+
pollResult = await pollRust((handle) => {
|
|
712
|
+
pollFunc(rustFuture, uniffiFutureContinuationCallback, handle);
|
|
713
|
+
});
|
|
714
|
+
while (pollResult !== UNIFFI_RUST_FUTURE_POLL_READY);
|
|
715
|
+
return liftFunc(rustCaller.makeRustCall((status) => completeFunc(rustFuture, status), liftString, errorHandler));
|
|
716
|
+
} finally {
|
|
717
|
+
if (keepAlive !== void 0) clearTimeout(keepAlive);
|
|
718
|
+
asyncOpts?.signal.removeEventListener("abort", abortFunc);
|
|
719
|
+
freeFunc(rustFuture);
|
|
720
|
+
}
|
|
721
|
+
}
|
|
722
|
+
const UNIFFI_RUST_FUTURE_RESOLVER_MAP = new UniffiHandleMap();
|
|
723
|
+
async function pollRust(pollFunc) {
|
|
724
|
+
return new Promise((resolve) => {
|
|
725
|
+
pollFunc(UNIFFI_RUST_FUTURE_RESOLVER_MAP.insert(resolve));
|
|
726
|
+
});
|
|
727
|
+
}
|
|
728
|
+
function createAbortFunction(rustFuture, cancelFunc) {
|
|
729
|
+
return () => cancelFunc(rustFuture);
|
|
730
|
+
}
|
|
731
|
+
const uniffiFutureContinuationCallback = (handle, pollResult) => {
|
|
732
|
+
const resolve = UNIFFI_RUST_FUTURE_RESOLVER_MAP.remove(handle);
|
|
733
|
+
if (resolve) resolve(pollResult);
|
|
734
|
+
};
|
|
735
|
+
//#endregion
|
|
736
|
+
//#region ../../../../../node_modules/@ubjs/core/dist/esm/cursor.js
|
|
737
|
+
/**
|
|
738
|
+
* Positional reader/writer over an `ArrayBuffer` slice with monomorphic typed
|
|
739
|
+
* accessors. One `DataView` and one `Uint8Array` are built at construction and
|
|
740
|
+
* reused for every primitive operation — no per-read DataView allocation, no
|
|
741
|
+
* function-pointer dispatch.
|
|
742
|
+
*
|
|
743
|
+
* Big-endian on the wire (matches the UniFFI RustBuffer wire format).
|
|
744
|
+
*/
|
|
745
|
+
var Cursor = class Cursor {
|
|
746
|
+
dv;
|
|
747
|
+
u8;
|
|
748
|
+
start;
|
|
749
|
+
end;
|
|
750
|
+
pos;
|
|
751
|
+
constructor(buffer, offset, length) {
|
|
752
|
+
this.dv = new DataView(buffer, offset, length);
|
|
753
|
+
this.u8 = new Uint8Array(buffer, offset, length);
|
|
754
|
+
this.start = offset;
|
|
755
|
+
this.end = offset + length;
|
|
756
|
+
this.pos = 0;
|
|
757
|
+
}
|
|
758
|
+
static fromUint8Array(view) {
|
|
759
|
+
return new Cursor(view.buffer, view.byteOffset, view.byteLength);
|
|
760
|
+
}
|
|
761
|
+
remaining() {
|
|
762
|
+
return this.end - this.start - this.pos;
|
|
763
|
+
}
|
|
764
|
+
skip(n) {
|
|
765
|
+
this.boundsCheck(n);
|
|
766
|
+
this.pos += n;
|
|
767
|
+
}
|
|
768
|
+
readU8() {
|
|
769
|
+
this.boundsCheck(1);
|
|
770
|
+
const v = this.dv.getUint8(this.pos);
|
|
771
|
+
this.pos += 1;
|
|
772
|
+
return v;
|
|
773
|
+
}
|
|
774
|
+
readI8() {
|
|
775
|
+
this.boundsCheck(1);
|
|
776
|
+
const v = this.dv.getInt8(this.pos);
|
|
777
|
+
this.pos += 1;
|
|
778
|
+
return v;
|
|
779
|
+
}
|
|
780
|
+
readU16() {
|
|
781
|
+
this.boundsCheck(2);
|
|
782
|
+
const v = this.dv.getUint16(this.pos);
|
|
783
|
+
this.pos += 2;
|
|
784
|
+
return v;
|
|
785
|
+
}
|
|
786
|
+
readI16() {
|
|
787
|
+
this.boundsCheck(2);
|
|
788
|
+
const v = this.dv.getInt16(this.pos);
|
|
789
|
+
this.pos += 2;
|
|
790
|
+
return v;
|
|
791
|
+
}
|
|
792
|
+
readU32() {
|
|
793
|
+
this.boundsCheck(4);
|
|
794
|
+
const v = this.dv.getUint32(this.pos);
|
|
795
|
+
this.pos += 4;
|
|
796
|
+
return v;
|
|
797
|
+
}
|
|
798
|
+
readI32() {
|
|
799
|
+
this.boundsCheck(4);
|
|
800
|
+
const v = this.dv.getInt32(this.pos);
|
|
801
|
+
this.pos += 4;
|
|
802
|
+
return v;
|
|
803
|
+
}
|
|
804
|
+
readU64() {
|
|
805
|
+
this.boundsCheck(8);
|
|
806
|
+
const v = this.dv.getBigUint64(this.pos);
|
|
807
|
+
this.pos += 8;
|
|
808
|
+
return v;
|
|
809
|
+
}
|
|
810
|
+
readI64() {
|
|
811
|
+
this.boundsCheck(8);
|
|
812
|
+
const v = this.dv.getBigInt64(this.pos);
|
|
813
|
+
this.pos += 8;
|
|
814
|
+
return v;
|
|
815
|
+
}
|
|
816
|
+
readF32() {
|
|
817
|
+
this.boundsCheck(4);
|
|
818
|
+
const v = this.dv.getFloat32(this.pos);
|
|
819
|
+
this.pos += 4;
|
|
820
|
+
return v;
|
|
821
|
+
}
|
|
822
|
+
readF64() {
|
|
823
|
+
this.boundsCheck(8);
|
|
824
|
+
const v = this.dv.getFloat64(this.pos);
|
|
825
|
+
this.pos += 8;
|
|
826
|
+
return v;
|
|
827
|
+
}
|
|
828
|
+
readBool() {
|
|
829
|
+
return this.readU8() !== 0;
|
|
830
|
+
}
|
|
831
|
+
writeU8(v) {
|
|
832
|
+
this.boundsCheck(1);
|
|
833
|
+
this.dv.setUint8(this.pos, v);
|
|
834
|
+
this.pos += 1;
|
|
835
|
+
}
|
|
836
|
+
writeI8(v) {
|
|
837
|
+
this.boundsCheck(1);
|
|
838
|
+
this.dv.setInt8(this.pos, v);
|
|
839
|
+
this.pos += 1;
|
|
840
|
+
}
|
|
841
|
+
writeU16(v) {
|
|
842
|
+
this.boundsCheck(2);
|
|
843
|
+
this.dv.setUint16(this.pos, v);
|
|
844
|
+
this.pos += 2;
|
|
845
|
+
}
|
|
846
|
+
writeI16(v) {
|
|
847
|
+
this.boundsCheck(2);
|
|
848
|
+
this.dv.setInt16(this.pos, v);
|
|
849
|
+
this.pos += 2;
|
|
850
|
+
}
|
|
851
|
+
writeU32(v) {
|
|
852
|
+
this.boundsCheck(4);
|
|
853
|
+
this.dv.setUint32(this.pos, v);
|
|
854
|
+
this.pos += 4;
|
|
855
|
+
}
|
|
856
|
+
writeI32(v) {
|
|
857
|
+
this.boundsCheck(4);
|
|
858
|
+
this.dv.setInt32(this.pos, v);
|
|
859
|
+
this.pos += 4;
|
|
860
|
+
}
|
|
861
|
+
writeU64(v) {
|
|
862
|
+
this.boundsCheck(8);
|
|
863
|
+
this.dv.setBigUint64(this.pos, v);
|
|
864
|
+
this.pos += 8;
|
|
865
|
+
}
|
|
866
|
+
writeI64(v) {
|
|
867
|
+
this.boundsCheck(8);
|
|
868
|
+
this.dv.setBigInt64(this.pos, v);
|
|
869
|
+
this.pos += 8;
|
|
870
|
+
}
|
|
871
|
+
writeF32(v) {
|
|
872
|
+
this.boundsCheck(4);
|
|
873
|
+
this.dv.setFloat32(this.pos, v);
|
|
874
|
+
this.pos += 4;
|
|
875
|
+
}
|
|
876
|
+
writeF64(v) {
|
|
877
|
+
this.boundsCheck(8);
|
|
878
|
+
this.dv.setFloat64(this.pos, v);
|
|
879
|
+
this.pos += 8;
|
|
880
|
+
}
|
|
881
|
+
writeBool(v) {
|
|
882
|
+
this.writeU8(v ? 1 : 0);
|
|
883
|
+
}
|
|
884
|
+
readBytes(len) {
|
|
885
|
+
this.boundsCheck(len);
|
|
886
|
+
const start = this.start + this.pos;
|
|
887
|
+
const out = new Uint8Array(this.u8.buffer.slice(start, start + len));
|
|
888
|
+
this.pos += len;
|
|
889
|
+
return out;
|
|
890
|
+
}
|
|
891
|
+
readArrayBuffer(len) {
|
|
892
|
+
this.boundsCheck(len);
|
|
893
|
+
const start = this.start + this.pos;
|
|
894
|
+
const out = this.u8.buffer.slice(start, start + len);
|
|
895
|
+
this.pos += len;
|
|
896
|
+
return out;
|
|
897
|
+
}
|
|
898
|
+
writeBytes(src) {
|
|
899
|
+
this.boundsCheck(src.byteLength);
|
|
900
|
+
this.u8.set(src, this.pos);
|
|
901
|
+
this.pos += src.byteLength;
|
|
902
|
+
}
|
|
903
|
+
boundsCheck(n) {
|
|
904
|
+
if (this.pos + n > this.end - this.start) throw new UniffiInternalError.BufferOverflow();
|
|
905
|
+
}
|
|
906
|
+
};
|
|
907
|
+
//#endregion
|
|
908
|
+
//#region ../../../../../node_modules/@ubjs/core/dist/esm/ffi-converters.js
|
|
909
|
+
var AbstractFfiConverterByteArray = class {
|
|
910
|
+
lift(value) {
|
|
911
|
+
const c = Cursor.fromUint8Array(value);
|
|
912
|
+
return this.readFromCursor(c);
|
|
913
|
+
}
|
|
914
|
+
lower(value, alloc) {
|
|
915
|
+
const view = alloc(this.allocationSize(value));
|
|
916
|
+
const c = Cursor.fromUint8Array(view);
|
|
917
|
+
this.writeIntoCursor(value, c);
|
|
918
|
+
return view;
|
|
919
|
+
}
|
|
920
|
+
};
|
|
921
|
+
/**
|
|
922
|
+
* Build a primitive `FfiConverter` whose hot path delegates straight into
|
|
923
|
+
* Cursor's monomorphic typed accessors. The returned object is a plain
|
|
924
|
+
* module-level value (not a class instance) — V8 can inline `lift`/`lower`
|
|
925
|
+
* trivially, and `readFromCursor`/`writeIntoCursor` are direct references
|
|
926
|
+
* to the Cursor method wrappers (no per-call function-pointer dispatch via
|
|
927
|
+
* the old `FfiConverterNumber(reader, writer, byteSize)` closure shape).
|
|
928
|
+
*/
|
|
929
|
+
function makePrimitive(read, write, byteSize) {
|
|
930
|
+
return {
|
|
931
|
+
lift: (v) => v,
|
|
932
|
+
lower: (v, _alloc) => v,
|
|
933
|
+
allocationSize: (_v) => byteSize,
|
|
934
|
+
readFromCursor: read,
|
|
935
|
+
writeIntoCursor: write
|
|
936
|
+
};
|
|
937
|
+
}
|
|
938
|
+
const FfiConverterUInt32 = makePrimitive((c) => c.readU32(), (v, c) => c.writeU32(v), 4);
|
|
939
|
+
const FfiConverterUInt64 = makePrimitive((c) => c.readU64(), (v, c) => c.writeU64(v), 8);
|
|
940
|
+
(() => {
|
|
941
|
+
const msPerSecBigInt = BigInt("1000");
|
|
942
|
+
const nanosPerMs = 1e6;
|
|
943
|
+
class FFIConverter extends AbstractFfiConverterByteArray {
|
|
944
|
+
readFromCursor(c) {
|
|
945
|
+
const secsBigInt = c.readU64();
|
|
946
|
+
const nanos = c.readU32();
|
|
947
|
+
const ms = Number(secsBigInt * msPerSecBigInt);
|
|
948
|
+
if (ms === Number.POSITIVE_INFINITY || ms === Number.NEGATIVE_INFINITY) throw new UniffiInternalError.NumberOverflow();
|
|
949
|
+
return ms + nanos / nanosPerMs;
|
|
950
|
+
}
|
|
951
|
+
writeIntoCursor(value, c) {
|
|
952
|
+
const ms = value.valueOf();
|
|
953
|
+
const secsBigInt = BigInt(Math.trunc(ms)) / msPerSecBigInt;
|
|
954
|
+
const remainingNanos = ms % 1e3 * nanosPerMs;
|
|
955
|
+
c.writeU64(secsBigInt);
|
|
956
|
+
c.writeU32(remainingNanos);
|
|
957
|
+
}
|
|
958
|
+
allocationSize(_value) {
|
|
959
|
+
return 12;
|
|
960
|
+
}
|
|
961
|
+
}
|
|
962
|
+
return new FFIConverter();
|
|
963
|
+
})();
|
|
964
|
+
(() => {
|
|
965
|
+
const msPerSecBigInt = BigInt("1000");
|
|
966
|
+
const nanosPerMs = 1e6;
|
|
967
|
+
const msPerSec = 1e3;
|
|
968
|
+
function safeDate(ms) {
|
|
969
|
+
if (Math.abs(ms) > 864e13) throw new UniffiInternalError.DateTimeOverflow();
|
|
970
|
+
return new Date(ms);
|
|
971
|
+
}
|
|
972
|
+
class FFIConverter extends AbstractFfiConverterByteArray {
|
|
973
|
+
readFromCursor(c) {
|
|
974
|
+
const secsBigInt = c.readI64();
|
|
975
|
+
const nanos = c.readU32();
|
|
976
|
+
const ms = Number(secsBigInt * msPerSecBigInt);
|
|
977
|
+
if (ms >= 0) return safeDate(ms + nanos / nanosPerMs);
|
|
978
|
+
else return safeDate(ms - nanos / nanosPerMs);
|
|
979
|
+
}
|
|
980
|
+
writeIntoCursor(value, c) {
|
|
981
|
+
const ms = value.valueOf();
|
|
982
|
+
const secsBigInt = BigInt(Math.trunc(ms / msPerSec));
|
|
983
|
+
const remainingNanos = Math.abs(ms % msPerSec * nanosPerMs);
|
|
984
|
+
c.writeI64(secsBigInt);
|
|
985
|
+
c.writeU32(remainingNanos);
|
|
986
|
+
}
|
|
987
|
+
allocationSize(_value) {
|
|
988
|
+
return 12;
|
|
989
|
+
}
|
|
990
|
+
}
|
|
991
|
+
return new FFIConverter();
|
|
992
|
+
})();
|
|
993
|
+
var FfiConverterOptional = class extends AbstractFfiConverterByteArray {
|
|
994
|
+
itemConverter;
|
|
995
|
+
constructor(itemConverter) {
|
|
996
|
+
super();
|
|
997
|
+
this.itemConverter = itemConverter;
|
|
998
|
+
}
|
|
999
|
+
readFromCursor(c) {
|
|
1000
|
+
return c.readU8() === 0 ? void 0 : this.itemConverter.readFromCursor(c);
|
|
1001
|
+
}
|
|
1002
|
+
writeIntoCursor(value, c) {
|
|
1003
|
+
if (value === void 0) {
|
|
1004
|
+
c.writeU8(0);
|
|
1005
|
+
return;
|
|
1006
|
+
}
|
|
1007
|
+
c.writeU8(1);
|
|
1008
|
+
this.itemConverter.writeIntoCursor(value, c);
|
|
1009
|
+
}
|
|
1010
|
+
allocationSize(value) {
|
|
1011
|
+
return 1 + (value === void 0 ? 0 : this.itemConverter.allocationSize(value));
|
|
1012
|
+
}
|
|
1013
|
+
};
|
|
1014
|
+
var FfiConverterArray = class extends AbstractFfiConverterByteArray {
|
|
1015
|
+
itemConverter;
|
|
1016
|
+
constructor(itemConverter) {
|
|
1017
|
+
super();
|
|
1018
|
+
this.itemConverter = itemConverter;
|
|
1019
|
+
}
|
|
1020
|
+
readFromCursor(c) {
|
|
1021
|
+
const size = c.readI32();
|
|
1022
|
+
const array = new Array(size);
|
|
1023
|
+
for (let i = 0; i < size; i++) array[i] = this.itemConverter.readFromCursor(c);
|
|
1024
|
+
return array;
|
|
1025
|
+
}
|
|
1026
|
+
writeIntoCursor(array, c) {
|
|
1027
|
+
c.writeI32(array.length);
|
|
1028
|
+
for (const item of array) this.itemConverter.writeIntoCursor(item, c);
|
|
1029
|
+
}
|
|
1030
|
+
allocationSize(array) {
|
|
1031
|
+
let size = 4;
|
|
1032
|
+
for (const item of array) size += this.itemConverter.allocationSize(item);
|
|
1033
|
+
return size;
|
|
1034
|
+
}
|
|
1035
|
+
};
|
|
1036
|
+
var FfiConverterMap = class extends AbstractFfiConverterByteArray {
|
|
1037
|
+
keyConverter;
|
|
1038
|
+
valueConverter;
|
|
1039
|
+
constructor(keyConverter, valueConverter) {
|
|
1040
|
+
super();
|
|
1041
|
+
this.keyConverter = keyConverter;
|
|
1042
|
+
this.valueConverter = valueConverter;
|
|
1043
|
+
}
|
|
1044
|
+
readFromCursor(c) {
|
|
1045
|
+
const size = c.readI32();
|
|
1046
|
+
const map = /* @__PURE__ */ new Map();
|
|
1047
|
+
for (let i = 0; i < size; i++) map.set(this.keyConverter.readFromCursor(c), this.valueConverter.readFromCursor(c));
|
|
1048
|
+
return map;
|
|
1049
|
+
}
|
|
1050
|
+
writeIntoCursor(map, c) {
|
|
1051
|
+
c.writeI32(map.size);
|
|
1052
|
+
for (const [k, v] of map.entries()) {
|
|
1053
|
+
this.keyConverter.writeIntoCursor(k, c);
|
|
1054
|
+
this.valueConverter.writeIntoCursor(v, c);
|
|
1055
|
+
}
|
|
1056
|
+
}
|
|
1057
|
+
allocationSize(map) {
|
|
1058
|
+
let size = 4;
|
|
1059
|
+
for (const [k, v] of map.entries()) size += this.keyConverter.allocationSize(k) + this.valueConverter.allocationSize(v);
|
|
1060
|
+
return size;
|
|
1061
|
+
}
|
|
1062
|
+
};
|
|
1063
|
+
const FfiConverterArrayBuffer = (() => {
|
|
1064
|
+
class FFIConverter extends AbstractFfiConverterByteArray {
|
|
1065
|
+
readFromCursor(c) {
|
|
1066
|
+
const length = c.readI32();
|
|
1067
|
+
return c.readArrayBuffer(length);
|
|
1068
|
+
}
|
|
1069
|
+
writeIntoCursor(value, c) {
|
|
1070
|
+
c.writeI32(value.byteLength);
|
|
1071
|
+
c.writeBytes(new Uint8Array(value));
|
|
1072
|
+
}
|
|
1073
|
+
allocationSize(value) {
|
|
1074
|
+
return 4 + value.byteLength;
|
|
1075
|
+
}
|
|
1076
|
+
}
|
|
1077
|
+
return new FFIConverter();
|
|
1078
|
+
})();
|
|
1079
|
+
(() => {
|
|
1080
|
+
class FFIConverter extends AbstractFfiConverterByteArray {
|
|
1081
|
+
readFromCursor(c) {
|
|
1082
|
+
const length = c.readI32();
|
|
1083
|
+
return c.readBytes(length);
|
|
1084
|
+
}
|
|
1085
|
+
writeIntoCursor(value, c) {
|
|
1086
|
+
c.writeI32(value.byteLength);
|
|
1087
|
+
c.writeBytes(value);
|
|
1088
|
+
}
|
|
1089
|
+
allocationSize(value) {
|
|
1090
|
+
return 4 + value.byteLength;
|
|
1091
|
+
}
|
|
1092
|
+
}
|
|
1093
|
+
return new FFIConverter();
|
|
1094
|
+
})();
|
|
1095
|
+
function uniffiCreateFfiConverterString(converter) {
|
|
1096
|
+
class FFIConverter {
|
|
1097
|
+
lift(value) {
|
|
1098
|
+
return converter.bytesToString(value);
|
|
1099
|
+
}
|
|
1100
|
+
lower(value, _alloc) {
|
|
1101
|
+
return converter.stringToBytes(value);
|
|
1102
|
+
}
|
|
1103
|
+
readFromCursor(c) {
|
|
1104
|
+
const length = c.readI32();
|
|
1105
|
+
if (converter.readStringFromBuffer) {
|
|
1106
|
+
const buf = { arrayBuffer: c.u8.buffer };
|
|
1107
|
+
const offset = c.start + c.pos;
|
|
1108
|
+
c.pos += length;
|
|
1109
|
+
return converter.readStringFromBuffer(buf, offset, length);
|
|
1110
|
+
}
|
|
1111
|
+
const bytes = c.readBytes(length);
|
|
1112
|
+
return converter.bytesToString(bytes);
|
|
1113
|
+
}
|
|
1114
|
+
writeIntoCursor(value, c) {
|
|
1115
|
+
if (converter.writeStringIntoBuffer) {
|
|
1116
|
+
const lengthPos = c.pos;
|
|
1117
|
+
c.pos += 4;
|
|
1118
|
+
const dataOffset = c.start + c.pos;
|
|
1119
|
+
const buf = { arrayBuffer: c.u8.buffer };
|
|
1120
|
+
const bytesWritten = converter.writeStringIntoBuffer(value, buf, dataOffset);
|
|
1121
|
+
c.dv.setInt32(lengthPos, bytesWritten);
|
|
1122
|
+
c.pos += bytesWritten;
|
|
1123
|
+
return;
|
|
1124
|
+
}
|
|
1125
|
+
const bytes = converter.stringToBytes(value);
|
|
1126
|
+
c.writeI32(bytes.byteLength);
|
|
1127
|
+
c.writeBytes(bytes);
|
|
1128
|
+
}
|
|
1129
|
+
allocationSize(value) {
|
|
1130
|
+
return 4 + converter.stringByteLength(value);
|
|
1131
|
+
}
|
|
1132
|
+
}
|
|
1133
|
+
return new FFIConverter();
|
|
1134
|
+
}
|
|
1135
|
+
//#endregion
|
|
1136
|
+
//#region ../../../../../node_modules/@ubjs/core/dist/esm/callbacks.js
|
|
1137
|
+
const handleConverter = FfiConverterUInt64;
|
|
1138
|
+
var FfiConverterCallback = class {
|
|
1139
|
+
handleMap;
|
|
1140
|
+
constructor(handleMap = new UniffiHandleMap()) {
|
|
1141
|
+
this.handleMap = handleMap;
|
|
1142
|
+
}
|
|
1143
|
+
lift(value) {
|
|
1144
|
+
return this.handleMap.get(value);
|
|
1145
|
+
}
|
|
1146
|
+
lower(value, _alloc) {
|
|
1147
|
+
return this.handleMap.insert(value);
|
|
1148
|
+
}
|
|
1149
|
+
readFromCursor(c) {
|
|
1150
|
+
return this.lift(handleConverter.readFromCursor(c));
|
|
1151
|
+
}
|
|
1152
|
+
writeIntoCursor(value, c) {
|
|
1153
|
+
handleConverter.writeIntoCursor(this.handleMap.insert(value), c);
|
|
1154
|
+
}
|
|
1155
|
+
allocationSize(value) {
|
|
1156
|
+
return handleConverter.allocationSize(defaultUniffiHandle);
|
|
1157
|
+
}
|
|
1158
|
+
clone(handle) {
|
|
1159
|
+
return this.handleMap.clone(handle);
|
|
1160
|
+
}
|
|
1161
|
+
drop(handle) {
|
|
1162
|
+
return this.handleMap.remove(handle);
|
|
1163
|
+
}
|
|
1164
|
+
};
|
|
1165
|
+
//#endregion
|
|
1166
|
+
//#region ../../../../../node_modules/@ubjs/core/dist/esm/objects.js
|
|
1167
|
+
/**
|
|
1168
|
+
* Marker interface for all `interface` objects that cross the FFI.
|
|
1169
|
+
* Reminder: `interface` objects have methods written in Rust.
|
|
1170
|
+
*
|
|
1171
|
+
* This typesscript interface contains the unffi methods that are needed to make
|
|
1172
|
+
* the FFI work. It should shrink to zero methods.
|
|
1173
|
+
*/
|
|
1174
|
+
var UniffiAbstractObject = class {
|
|
1175
|
+
/**
|
|
1176
|
+
* A convenience method to use this object, then destroy it after its use.
|
|
1177
|
+
* @param block
|
|
1178
|
+
* @returns
|
|
1179
|
+
*/
|
|
1180
|
+
uniffiUse(block) {
|
|
1181
|
+
const v = block(this);
|
|
1182
|
+
this.uniffiDestroy();
|
|
1183
|
+
return v;
|
|
1184
|
+
}
|
|
1185
|
+
};
|
|
1186
|
+
const pointerConverter = FfiConverterUInt64;
|
|
1187
|
+
const dummyPointer = BigInt("0");
|
|
1188
|
+
/**
|
|
1189
|
+
* An FfiConverter for an object.
|
|
1190
|
+
*/
|
|
1191
|
+
var FfiConverterObject = class {
|
|
1192
|
+
factory;
|
|
1193
|
+
constructor(factory) {
|
|
1194
|
+
this.factory = factory;
|
|
1195
|
+
}
|
|
1196
|
+
lift(value) {
|
|
1197
|
+
return this.factory.create(value);
|
|
1198
|
+
}
|
|
1199
|
+
lower(value, _alloc) {
|
|
1200
|
+
return this.lowerHandle(value);
|
|
1201
|
+
}
|
|
1202
|
+
readFromCursor(c) {
|
|
1203
|
+
return this.lift(pointerConverter.readFromCursor(c));
|
|
1204
|
+
}
|
|
1205
|
+
writeIntoCursor(value, c) {
|
|
1206
|
+
pointerConverter.writeIntoCursor(this.lowerHandle(value), c);
|
|
1207
|
+
}
|
|
1208
|
+
lowerHandle(value) {
|
|
1209
|
+
if (this.factory.isConcreteType(value)) return this.factory.clonePointer(value);
|
|
1210
|
+
else throw new Error("Cannot lower this object to a pointer");
|
|
1211
|
+
}
|
|
1212
|
+
allocationSize(value) {
|
|
1213
|
+
return pointerConverter.allocationSize(dummyPointer);
|
|
1214
|
+
}
|
|
1215
|
+
};
|
|
1216
|
+
//#endregion
|
|
1217
|
+
//#region ../../../../../node_modules/@ubjs/core/dist/esm/records.js
|
|
1218
|
+
/**
|
|
1219
|
+
* @param defaults function that returns the defaults of the record. This is done as a function rather than a literal so
|
|
1220
|
+
* that the defaults are calculated lazily, i.e. after everything has been declared.
|
|
1221
|
+
* @returns a function to create a new {T} with a partial that requires at least the missing keys to be present.
|
|
1222
|
+
*/
|
|
1223
|
+
const uniffiCreateRecord = (defaults) => {
|
|
1224
|
+
return (partial) => Object.freeze({
|
|
1225
|
+
...defaults(),
|
|
1226
|
+
...partial
|
|
1227
|
+
});
|
|
1228
|
+
};
|
|
1229
|
+
//#endregion
|
|
1230
|
+
//#region ../../../../../target/trylimbo/codegen/ffi-trylimbo_plugin_mxf/trylimbo_plugin_mxf-ffi.ts
|
|
1231
|
+
const { UniffiNativeModule, FfiType, resolveLibPath } = import_lib.default;
|
|
1232
|
+
const DEFINITIONS = {
|
|
1233
|
+
symbols: {
|
|
1234
|
+
rustbuffer_alloc: "ffi_trylimbo_plugin_mxf_rustbuffer_alloc",
|
|
1235
|
+
rustbuffer_free: "ffi_trylimbo_plugin_mxf_rustbuffer_free",
|
|
1236
|
+
rustbuffer_from_bytes: "ffi_trylimbo_plugin_mxf_rustbuffer_from_bytes"
|
|
1237
|
+
},
|
|
1238
|
+
functions: {
|
|
1239
|
+
"ffi_trylimbo_plugin_mxf_rust_future_poll_u8": {
|
|
1240
|
+
args: [
|
|
1241
|
+
FfiType.Handle,
|
|
1242
|
+
FfiType.Callback("RustFutureContinuationCallback"),
|
|
1243
|
+
FfiType.Handle
|
|
1244
|
+
],
|
|
1245
|
+
ret: FfiType.Void,
|
|
1246
|
+
hasRustCallStatus: false
|
|
1247
|
+
},
|
|
1248
|
+
"ffi_trylimbo_plugin_mxf_rust_future_cancel_u8": {
|
|
1249
|
+
args: [FfiType.Handle],
|
|
1250
|
+
ret: FfiType.Void,
|
|
1251
|
+
hasRustCallStatus: false
|
|
1252
|
+
},
|
|
1253
|
+
"ffi_trylimbo_plugin_mxf_rust_future_complete_u8": {
|
|
1254
|
+
args: [FfiType.Handle],
|
|
1255
|
+
ret: FfiType.UInt8,
|
|
1256
|
+
hasRustCallStatus: true
|
|
1257
|
+
},
|
|
1258
|
+
"ffi_trylimbo_plugin_mxf_rust_future_free_u8": {
|
|
1259
|
+
args: [FfiType.Handle],
|
|
1260
|
+
ret: FfiType.Void,
|
|
1261
|
+
hasRustCallStatus: false
|
|
1262
|
+
},
|
|
1263
|
+
"ffi_trylimbo_plugin_mxf_rust_future_poll_i8": {
|
|
1264
|
+
args: [
|
|
1265
|
+
FfiType.Handle,
|
|
1266
|
+
FfiType.Callback("RustFutureContinuationCallback"),
|
|
1267
|
+
FfiType.Handle
|
|
1268
|
+
],
|
|
1269
|
+
ret: FfiType.Void,
|
|
1270
|
+
hasRustCallStatus: false
|
|
1271
|
+
},
|
|
1272
|
+
"ffi_trylimbo_plugin_mxf_rust_future_cancel_i8": {
|
|
1273
|
+
args: [FfiType.Handle],
|
|
1274
|
+
ret: FfiType.Void,
|
|
1275
|
+
hasRustCallStatus: false
|
|
1276
|
+
},
|
|
1277
|
+
"ffi_trylimbo_plugin_mxf_rust_future_complete_i8": {
|
|
1278
|
+
args: [FfiType.Handle],
|
|
1279
|
+
ret: FfiType.Int8,
|
|
1280
|
+
hasRustCallStatus: true
|
|
1281
|
+
},
|
|
1282
|
+
"ffi_trylimbo_plugin_mxf_rust_future_free_i8": {
|
|
1283
|
+
args: [FfiType.Handle],
|
|
1284
|
+
ret: FfiType.Void,
|
|
1285
|
+
hasRustCallStatus: false
|
|
1286
|
+
},
|
|
1287
|
+
"ffi_trylimbo_plugin_mxf_rust_future_poll_u16": {
|
|
1288
|
+
args: [
|
|
1289
|
+
FfiType.Handle,
|
|
1290
|
+
FfiType.Callback("RustFutureContinuationCallback"),
|
|
1291
|
+
FfiType.Handle
|
|
1292
|
+
],
|
|
1293
|
+
ret: FfiType.Void,
|
|
1294
|
+
hasRustCallStatus: false
|
|
1295
|
+
},
|
|
1296
|
+
"ffi_trylimbo_plugin_mxf_rust_future_cancel_u16": {
|
|
1297
|
+
args: [FfiType.Handle],
|
|
1298
|
+
ret: FfiType.Void,
|
|
1299
|
+
hasRustCallStatus: false
|
|
1300
|
+
},
|
|
1301
|
+
"ffi_trylimbo_plugin_mxf_rust_future_complete_u16": {
|
|
1302
|
+
args: [FfiType.Handle],
|
|
1303
|
+
ret: FfiType.UInt16,
|
|
1304
|
+
hasRustCallStatus: true
|
|
1305
|
+
},
|
|
1306
|
+
"ffi_trylimbo_plugin_mxf_rust_future_free_u16": {
|
|
1307
|
+
args: [FfiType.Handle],
|
|
1308
|
+
ret: FfiType.Void,
|
|
1309
|
+
hasRustCallStatus: false
|
|
1310
|
+
},
|
|
1311
|
+
"ffi_trylimbo_plugin_mxf_rust_future_poll_i16": {
|
|
1312
|
+
args: [
|
|
1313
|
+
FfiType.Handle,
|
|
1314
|
+
FfiType.Callback("RustFutureContinuationCallback"),
|
|
1315
|
+
FfiType.Handle
|
|
1316
|
+
],
|
|
1317
|
+
ret: FfiType.Void,
|
|
1318
|
+
hasRustCallStatus: false
|
|
1319
|
+
},
|
|
1320
|
+
"ffi_trylimbo_plugin_mxf_rust_future_cancel_i16": {
|
|
1321
|
+
args: [FfiType.Handle],
|
|
1322
|
+
ret: FfiType.Void,
|
|
1323
|
+
hasRustCallStatus: false
|
|
1324
|
+
},
|
|
1325
|
+
"ffi_trylimbo_plugin_mxf_rust_future_complete_i16": {
|
|
1326
|
+
args: [FfiType.Handle],
|
|
1327
|
+
ret: FfiType.Int16,
|
|
1328
|
+
hasRustCallStatus: true
|
|
1329
|
+
},
|
|
1330
|
+
"ffi_trylimbo_plugin_mxf_rust_future_free_i16": {
|
|
1331
|
+
args: [FfiType.Handle],
|
|
1332
|
+
ret: FfiType.Void,
|
|
1333
|
+
hasRustCallStatus: false
|
|
1334
|
+
},
|
|
1335
|
+
"ffi_trylimbo_plugin_mxf_rust_future_poll_u32": {
|
|
1336
|
+
args: [
|
|
1337
|
+
FfiType.Handle,
|
|
1338
|
+
FfiType.Callback("RustFutureContinuationCallback"),
|
|
1339
|
+
FfiType.Handle
|
|
1340
|
+
],
|
|
1341
|
+
ret: FfiType.Void,
|
|
1342
|
+
hasRustCallStatus: false
|
|
1343
|
+
},
|
|
1344
|
+
"ffi_trylimbo_plugin_mxf_rust_future_cancel_u32": {
|
|
1345
|
+
args: [FfiType.Handle],
|
|
1346
|
+
ret: FfiType.Void,
|
|
1347
|
+
hasRustCallStatus: false
|
|
1348
|
+
},
|
|
1349
|
+
"ffi_trylimbo_plugin_mxf_rust_future_complete_u32": {
|
|
1350
|
+
args: [FfiType.Handle],
|
|
1351
|
+
ret: FfiType.UInt32,
|
|
1352
|
+
hasRustCallStatus: true
|
|
1353
|
+
},
|
|
1354
|
+
"ffi_trylimbo_plugin_mxf_rust_future_free_u32": {
|
|
1355
|
+
args: [FfiType.Handle],
|
|
1356
|
+
ret: FfiType.Void,
|
|
1357
|
+
hasRustCallStatus: false
|
|
1358
|
+
},
|
|
1359
|
+
"ffi_trylimbo_plugin_mxf_rust_future_poll_i32": {
|
|
1360
|
+
args: [
|
|
1361
|
+
FfiType.Handle,
|
|
1362
|
+
FfiType.Callback("RustFutureContinuationCallback"),
|
|
1363
|
+
FfiType.Handle
|
|
1364
|
+
],
|
|
1365
|
+
ret: FfiType.Void,
|
|
1366
|
+
hasRustCallStatus: false
|
|
1367
|
+
},
|
|
1368
|
+
"ffi_trylimbo_plugin_mxf_rust_future_cancel_i32": {
|
|
1369
|
+
args: [FfiType.Handle],
|
|
1370
|
+
ret: FfiType.Void,
|
|
1371
|
+
hasRustCallStatus: false
|
|
1372
|
+
},
|
|
1373
|
+
"ffi_trylimbo_plugin_mxf_rust_future_complete_i32": {
|
|
1374
|
+
args: [FfiType.Handle],
|
|
1375
|
+
ret: FfiType.Int32,
|
|
1376
|
+
hasRustCallStatus: true
|
|
1377
|
+
},
|
|
1378
|
+
"ffi_trylimbo_plugin_mxf_rust_future_free_i32": {
|
|
1379
|
+
args: [FfiType.Handle],
|
|
1380
|
+
ret: FfiType.Void,
|
|
1381
|
+
hasRustCallStatus: false
|
|
1382
|
+
},
|
|
1383
|
+
"ffi_trylimbo_plugin_mxf_rust_future_poll_u64": {
|
|
1384
|
+
args: [
|
|
1385
|
+
FfiType.Handle,
|
|
1386
|
+
FfiType.Callback("RustFutureContinuationCallback"),
|
|
1387
|
+
FfiType.Handle
|
|
1388
|
+
],
|
|
1389
|
+
ret: FfiType.Void,
|
|
1390
|
+
hasRustCallStatus: false
|
|
1391
|
+
},
|
|
1392
|
+
"ffi_trylimbo_plugin_mxf_rust_future_cancel_u64": {
|
|
1393
|
+
args: [FfiType.Handle],
|
|
1394
|
+
ret: FfiType.Void,
|
|
1395
|
+
hasRustCallStatus: false
|
|
1396
|
+
},
|
|
1397
|
+
"ffi_trylimbo_plugin_mxf_rust_future_complete_u64": {
|
|
1398
|
+
args: [FfiType.Handle],
|
|
1399
|
+
ret: FfiType.Handle,
|
|
1400
|
+
hasRustCallStatus: true
|
|
1401
|
+
},
|
|
1402
|
+
"ffi_trylimbo_plugin_mxf_rust_future_free_u64": {
|
|
1403
|
+
args: [FfiType.Handle],
|
|
1404
|
+
ret: FfiType.Void,
|
|
1405
|
+
hasRustCallStatus: false
|
|
1406
|
+
},
|
|
1407
|
+
"ffi_trylimbo_plugin_mxf_rust_future_poll_i64": {
|
|
1408
|
+
args: [
|
|
1409
|
+
FfiType.Handle,
|
|
1410
|
+
FfiType.Callback("RustFutureContinuationCallback"),
|
|
1411
|
+
FfiType.Handle
|
|
1412
|
+
],
|
|
1413
|
+
ret: FfiType.Void,
|
|
1414
|
+
hasRustCallStatus: false
|
|
1415
|
+
},
|
|
1416
|
+
"ffi_trylimbo_plugin_mxf_rust_future_cancel_i64": {
|
|
1417
|
+
args: [FfiType.Handle],
|
|
1418
|
+
ret: FfiType.Void,
|
|
1419
|
+
hasRustCallStatus: false
|
|
1420
|
+
},
|
|
1421
|
+
"ffi_trylimbo_plugin_mxf_rust_future_complete_i64": {
|
|
1422
|
+
args: [FfiType.Handle],
|
|
1423
|
+
ret: FfiType.Int64,
|
|
1424
|
+
hasRustCallStatus: true
|
|
1425
|
+
},
|
|
1426
|
+
"ffi_trylimbo_plugin_mxf_rust_future_free_i64": {
|
|
1427
|
+
args: [FfiType.Handle],
|
|
1428
|
+
ret: FfiType.Void,
|
|
1429
|
+
hasRustCallStatus: false
|
|
1430
|
+
},
|
|
1431
|
+
"ffi_trylimbo_plugin_mxf_rust_future_poll_f32": {
|
|
1432
|
+
args: [
|
|
1433
|
+
FfiType.Handle,
|
|
1434
|
+
FfiType.Callback("RustFutureContinuationCallback"),
|
|
1435
|
+
FfiType.Handle
|
|
1436
|
+
],
|
|
1437
|
+
ret: FfiType.Void,
|
|
1438
|
+
hasRustCallStatus: false
|
|
1439
|
+
},
|
|
1440
|
+
"ffi_trylimbo_plugin_mxf_rust_future_cancel_f32": {
|
|
1441
|
+
args: [FfiType.Handle],
|
|
1442
|
+
ret: FfiType.Void,
|
|
1443
|
+
hasRustCallStatus: false
|
|
1444
|
+
},
|
|
1445
|
+
"ffi_trylimbo_plugin_mxf_rust_future_complete_f32": {
|
|
1446
|
+
args: [FfiType.Handle],
|
|
1447
|
+
ret: FfiType.Float32,
|
|
1448
|
+
hasRustCallStatus: true
|
|
1449
|
+
},
|
|
1450
|
+
"ffi_trylimbo_plugin_mxf_rust_future_free_f32": {
|
|
1451
|
+
args: [FfiType.Handle],
|
|
1452
|
+
ret: FfiType.Void,
|
|
1453
|
+
hasRustCallStatus: false
|
|
1454
|
+
},
|
|
1455
|
+
"ffi_trylimbo_plugin_mxf_rust_future_poll_f64": {
|
|
1456
|
+
args: [
|
|
1457
|
+
FfiType.Handle,
|
|
1458
|
+
FfiType.Callback("RustFutureContinuationCallback"),
|
|
1459
|
+
FfiType.Handle
|
|
1460
|
+
],
|
|
1461
|
+
ret: FfiType.Void,
|
|
1462
|
+
hasRustCallStatus: false
|
|
1463
|
+
},
|
|
1464
|
+
"ffi_trylimbo_plugin_mxf_rust_future_cancel_f64": {
|
|
1465
|
+
args: [FfiType.Handle],
|
|
1466
|
+
ret: FfiType.Void,
|
|
1467
|
+
hasRustCallStatus: false
|
|
1468
|
+
},
|
|
1469
|
+
"ffi_trylimbo_plugin_mxf_rust_future_complete_f64": {
|
|
1470
|
+
args: [FfiType.Handle],
|
|
1471
|
+
ret: FfiType.Float64,
|
|
1472
|
+
hasRustCallStatus: true
|
|
1473
|
+
},
|
|
1474
|
+
"ffi_trylimbo_plugin_mxf_rust_future_free_f64": {
|
|
1475
|
+
args: [FfiType.Handle],
|
|
1476
|
+
ret: FfiType.Void,
|
|
1477
|
+
hasRustCallStatus: false
|
|
1478
|
+
},
|
|
1479
|
+
"ffi_trylimbo_plugin_mxf_rust_future_poll_rust_buffer": {
|
|
1480
|
+
args: [
|
|
1481
|
+
FfiType.Handle,
|
|
1482
|
+
FfiType.Callback("RustFutureContinuationCallback"),
|
|
1483
|
+
FfiType.Handle
|
|
1484
|
+
],
|
|
1485
|
+
ret: FfiType.Void,
|
|
1486
|
+
hasRustCallStatus: false
|
|
1487
|
+
},
|
|
1488
|
+
"ffi_trylimbo_plugin_mxf_rust_future_cancel_rust_buffer": {
|
|
1489
|
+
args: [FfiType.Handle],
|
|
1490
|
+
ret: FfiType.Void,
|
|
1491
|
+
hasRustCallStatus: false
|
|
1492
|
+
},
|
|
1493
|
+
"ffi_trylimbo_plugin_mxf_rust_future_complete_rust_buffer": {
|
|
1494
|
+
args: [FfiType.Handle],
|
|
1495
|
+
ret: FfiType.RustBuffer,
|
|
1496
|
+
hasRustCallStatus: true
|
|
1497
|
+
},
|
|
1498
|
+
"ffi_trylimbo_plugin_mxf_rust_future_free_rust_buffer": {
|
|
1499
|
+
args: [FfiType.Handle],
|
|
1500
|
+
ret: FfiType.Void,
|
|
1501
|
+
hasRustCallStatus: false
|
|
1502
|
+
},
|
|
1503
|
+
"ffi_trylimbo_plugin_mxf_rust_future_poll_void": {
|
|
1504
|
+
args: [
|
|
1505
|
+
FfiType.Handle,
|
|
1506
|
+
FfiType.Callback("RustFutureContinuationCallback"),
|
|
1507
|
+
FfiType.Handle
|
|
1508
|
+
],
|
|
1509
|
+
ret: FfiType.Void,
|
|
1510
|
+
hasRustCallStatus: false
|
|
1511
|
+
},
|
|
1512
|
+
"ffi_trylimbo_plugin_mxf_rust_future_cancel_void": {
|
|
1513
|
+
args: [FfiType.Handle],
|
|
1514
|
+
ret: FfiType.Void,
|
|
1515
|
+
hasRustCallStatus: false
|
|
1516
|
+
},
|
|
1517
|
+
"ffi_trylimbo_plugin_mxf_rust_future_complete_void": {
|
|
1518
|
+
args: [FfiType.Handle],
|
|
1519
|
+
ret: FfiType.Void,
|
|
1520
|
+
hasRustCallStatus: true
|
|
1521
|
+
},
|
|
1522
|
+
"ffi_trylimbo_plugin_mxf_rust_future_free_void": {
|
|
1523
|
+
args: [FfiType.Handle],
|
|
1524
|
+
ret: FfiType.Void,
|
|
1525
|
+
hasRustCallStatus: false
|
|
1526
|
+
},
|
|
1527
|
+
"uniffi_trylimbo_plugin_mxf_fn_clone_mxfauthor": {
|
|
1528
|
+
args: [FfiType.Handle],
|
|
1529
|
+
ret: FfiType.Handle,
|
|
1530
|
+
hasRustCallStatus: true
|
|
1531
|
+
},
|
|
1532
|
+
"uniffi_trylimbo_plugin_mxf_fn_free_mxfauthor": {
|
|
1533
|
+
args: [FfiType.Handle],
|
|
1534
|
+
ret: FfiType.Void,
|
|
1535
|
+
hasRustCallStatus: true
|
|
1536
|
+
},
|
|
1537
|
+
"uniffi_trylimbo_plugin_mxf_fn_clone_mxfplugin": {
|
|
1538
|
+
args: [FfiType.Handle],
|
|
1539
|
+
ret: FfiType.Handle,
|
|
1540
|
+
hasRustCallStatus: true
|
|
1541
|
+
},
|
|
1542
|
+
"uniffi_trylimbo_plugin_mxf_fn_free_mxfplugin": {
|
|
1543
|
+
args: [FfiType.Handle],
|
|
1544
|
+
ret: FfiType.Void,
|
|
1545
|
+
hasRustCallStatus: true
|
|
1546
|
+
},
|
|
1547
|
+
"uniffi_trylimbo_plugin_mxf_fn_init_callback_vtable_rangesink": {
|
|
1548
|
+
args: [FfiType.Reference(FfiType.Struct("VTableCallbackInterfaceTrylimboPluginMxfRangeSink"))],
|
|
1549
|
+
ret: FfiType.Void,
|
|
1550
|
+
hasRustCallStatus: false
|
|
1551
|
+
},
|
|
1552
|
+
"uniffi_trylimbo_plugin_mxf_fn_init_callback_vtable_rangesource": {
|
|
1553
|
+
args: [FfiType.Reference(FfiType.Struct("VTableCallbackInterfaceTrylimboPluginMxfRangeSource"))],
|
|
1554
|
+
ret: FfiType.Void,
|
|
1555
|
+
hasRustCallStatus: false
|
|
1556
|
+
},
|
|
1557
|
+
"uniffi_trylimbo_plugin_mxf_fn_constructor_mxfauthor_new": {
|
|
1558
|
+
args: [],
|
|
1559
|
+
ret: FfiType.Handle,
|
|
1560
|
+
hasRustCallStatus: true
|
|
1561
|
+
},
|
|
1562
|
+
"uniffi_trylimbo_plugin_mxf_fn_method_mxfauthor_locate": {
|
|
1563
|
+
args: [FfiType.Handle, FfiType.Handle],
|
|
1564
|
+
ret: FfiType.Handle,
|
|
1565
|
+
hasRustCallStatus: false
|
|
1566
|
+
},
|
|
1567
|
+
"uniffi_trylimbo_plugin_mxf_fn_method_mxfauthor_media_types": {
|
|
1568
|
+
args: [FfiType.Handle],
|
|
1569
|
+
ret: FfiType.RustBuffer,
|
|
1570
|
+
hasRustCallStatus: true
|
|
1571
|
+
},
|
|
1572
|
+
"uniffi_trylimbo_plugin_mxf_fn_method_mxfauthor_reserve_slot": {
|
|
1573
|
+
args: [
|
|
1574
|
+
FfiType.Handle,
|
|
1575
|
+
FfiType.Handle,
|
|
1576
|
+
FfiType.UInt64
|
|
1577
|
+
],
|
|
1578
|
+
ret: FfiType.Handle,
|
|
1579
|
+
hasRustCallStatus: false
|
|
1580
|
+
},
|
|
1581
|
+
"uniffi_trylimbo_plugin_mxf_fn_method_mxfauthor_sniff": {
|
|
1582
|
+
args: [FfiType.Handle, FfiType.Handle],
|
|
1583
|
+
ret: FfiType.Handle,
|
|
1584
|
+
hasRustCallStatus: false
|
|
1585
|
+
},
|
|
1586
|
+
"uniffi_trylimbo_plugin_mxf_fn_constructor_mxfplugin_new": {
|
|
1587
|
+
args: [],
|
|
1588
|
+
ret: FfiType.Handle,
|
|
1589
|
+
hasRustCallStatus: true
|
|
1590
|
+
},
|
|
1591
|
+
"uniffi_trylimbo_plugin_mxf_fn_method_mxfplugin_locate": {
|
|
1592
|
+
args: [FfiType.Handle, FfiType.Handle],
|
|
1593
|
+
ret: FfiType.Handle,
|
|
1594
|
+
hasRustCallStatus: false
|
|
1595
|
+
},
|
|
1596
|
+
"uniffi_trylimbo_plugin_mxf_fn_method_mxfplugin_media_types": {
|
|
1597
|
+
args: [FfiType.Handle],
|
|
1598
|
+
ret: FfiType.RustBuffer,
|
|
1599
|
+
hasRustCallStatus: true
|
|
1600
|
+
},
|
|
1601
|
+
"uniffi_trylimbo_plugin_mxf_fn_method_mxfplugin_sniff": {
|
|
1602
|
+
args: [FfiType.Handle, FfiType.Handle],
|
|
1603
|
+
ret: FfiType.Handle,
|
|
1604
|
+
hasRustCallStatus: false
|
|
1605
|
+
},
|
|
1606
|
+
"ffi_trylimbo_plugin_mxf_uniffi_contract_version": {
|
|
1607
|
+
args: [],
|
|
1608
|
+
ret: FfiType.UInt32,
|
|
1609
|
+
hasRustCallStatus: false
|
|
1610
|
+
},
|
|
1611
|
+
"uniffi_trylimbo_plugin_mxf_checksum_constructor_mxfauthor_new": {
|
|
1612
|
+
args: [],
|
|
1613
|
+
ret: FfiType.UInt16,
|
|
1614
|
+
hasRustCallStatus: false
|
|
1615
|
+
},
|
|
1616
|
+
"uniffi_trylimbo_plugin_mxf_checksum_method_mxfauthor_locate": {
|
|
1617
|
+
args: [],
|
|
1618
|
+
ret: FfiType.UInt16,
|
|
1619
|
+
hasRustCallStatus: false
|
|
1620
|
+
},
|
|
1621
|
+
"uniffi_trylimbo_plugin_mxf_checksum_method_mxfauthor_media_types": {
|
|
1622
|
+
args: [],
|
|
1623
|
+
ret: FfiType.UInt16,
|
|
1624
|
+
hasRustCallStatus: false
|
|
1625
|
+
},
|
|
1626
|
+
"uniffi_trylimbo_plugin_mxf_checksum_method_mxfauthor_reserve_slot": {
|
|
1627
|
+
args: [],
|
|
1628
|
+
ret: FfiType.UInt16,
|
|
1629
|
+
hasRustCallStatus: false
|
|
1630
|
+
},
|
|
1631
|
+
"uniffi_trylimbo_plugin_mxf_checksum_method_mxfauthor_sniff": {
|
|
1632
|
+
args: [],
|
|
1633
|
+
ret: FfiType.UInt16,
|
|
1634
|
+
hasRustCallStatus: false
|
|
1635
|
+
},
|
|
1636
|
+
"uniffi_trylimbo_plugin_mxf_checksum_constructor_mxfplugin_new": {
|
|
1637
|
+
args: [],
|
|
1638
|
+
ret: FfiType.UInt16,
|
|
1639
|
+
hasRustCallStatus: false
|
|
1640
|
+
},
|
|
1641
|
+
"uniffi_trylimbo_plugin_mxf_checksum_method_mxfplugin_locate": {
|
|
1642
|
+
args: [],
|
|
1643
|
+
ret: FfiType.UInt16,
|
|
1644
|
+
hasRustCallStatus: false
|
|
1645
|
+
},
|
|
1646
|
+
"uniffi_trylimbo_plugin_mxf_checksum_method_mxfplugin_media_types": {
|
|
1647
|
+
args: [],
|
|
1648
|
+
ret: FfiType.UInt16,
|
|
1649
|
+
hasRustCallStatus: false
|
|
1650
|
+
},
|
|
1651
|
+
"uniffi_trylimbo_plugin_mxf_checksum_method_mxfplugin_sniff": {
|
|
1652
|
+
args: [],
|
|
1653
|
+
ret: FfiType.UInt16,
|
|
1654
|
+
hasRustCallStatus: false
|
|
1655
|
+
}
|
|
1656
|
+
},
|
|
1657
|
+
callbacks: {
|
|
1658
|
+
"RustFutureContinuationCallback": {
|
|
1659
|
+
args: [FfiType.Handle, FfiType.Int8],
|
|
1660
|
+
ret: FfiType.Void,
|
|
1661
|
+
hasRustCallStatus: false
|
|
1662
|
+
},
|
|
1663
|
+
"ForeignFutureDroppedCallback": {
|
|
1664
|
+
args: [FfiType.Handle],
|
|
1665
|
+
ret: FfiType.Void,
|
|
1666
|
+
hasRustCallStatus: false
|
|
1667
|
+
},
|
|
1668
|
+
"ForeignFutureCompleteu64": {
|
|
1669
|
+
args: [FfiType.Handle, FfiType.Struct("ForeignFutureResultU64")],
|
|
1670
|
+
ret: FfiType.Void,
|
|
1671
|
+
hasRustCallStatus: false
|
|
1672
|
+
},
|
|
1673
|
+
"CallbackInterfaceTrylimboPluginMxfRangeSinkMethod0": {
|
|
1674
|
+
args: [
|
|
1675
|
+
FfiType.Handle,
|
|
1676
|
+
FfiType.Callback("ForeignFutureCompleteu64"),
|
|
1677
|
+
FfiType.Handle
|
|
1678
|
+
],
|
|
1679
|
+
ret: FfiType.Struct("ForeignFutureDroppedCallbackStruct"),
|
|
1680
|
+
hasRustCallStatus: false,
|
|
1681
|
+
outReturn: true
|
|
1682
|
+
},
|
|
1683
|
+
"ForeignFutureCompleterust_buffer": {
|
|
1684
|
+
args: [FfiType.Handle, FfiType.Struct("ForeignFutureResultRustBuffer")],
|
|
1685
|
+
ret: FfiType.Void,
|
|
1686
|
+
hasRustCallStatus: false
|
|
1687
|
+
},
|
|
1688
|
+
"CallbackInterfaceTrylimboPluginMxfRangeSinkMethod1": {
|
|
1689
|
+
args: [
|
|
1690
|
+
FfiType.Handle,
|
|
1691
|
+
FfiType.UInt64,
|
|
1692
|
+
FfiType.UInt32,
|
|
1693
|
+
FfiType.Callback("ForeignFutureCompleterust_buffer"),
|
|
1694
|
+
FfiType.Handle
|
|
1695
|
+
],
|
|
1696
|
+
ret: FfiType.Struct("ForeignFutureDroppedCallbackStruct"),
|
|
1697
|
+
hasRustCallStatus: false,
|
|
1698
|
+
outReturn: true
|
|
1699
|
+
},
|
|
1700
|
+
"ForeignFutureCompletevoid": {
|
|
1701
|
+
args: [FfiType.Handle, FfiType.Struct("ForeignFutureResultVoid")],
|
|
1702
|
+
ret: FfiType.Void,
|
|
1703
|
+
hasRustCallStatus: false
|
|
1704
|
+
},
|
|
1705
|
+
"CallbackInterfaceTrylimboPluginMxfRangeSinkMethod2": {
|
|
1706
|
+
args: [
|
|
1707
|
+
FfiType.Handle,
|
|
1708
|
+
FfiType.UInt64,
|
|
1709
|
+
FfiType.RustBuffer,
|
|
1710
|
+
FfiType.Callback("ForeignFutureCompletevoid"),
|
|
1711
|
+
FfiType.Handle
|
|
1712
|
+
],
|
|
1713
|
+
ret: FfiType.Struct("ForeignFutureDroppedCallbackStruct"),
|
|
1714
|
+
hasRustCallStatus: false,
|
|
1715
|
+
outReturn: true
|
|
1716
|
+
},
|
|
1717
|
+
"CallbackInterfaceTrylimboPluginMxfRangeSinkMethod3": {
|
|
1718
|
+
args: [
|
|
1719
|
+
FfiType.Handle,
|
|
1720
|
+
FfiType.UInt64,
|
|
1721
|
+
FfiType.Callback("ForeignFutureCompletevoid"),
|
|
1722
|
+
FfiType.Handle
|
|
1723
|
+
],
|
|
1724
|
+
ret: FfiType.Struct("ForeignFutureDroppedCallbackStruct"),
|
|
1725
|
+
hasRustCallStatus: false,
|
|
1726
|
+
outReturn: true
|
|
1727
|
+
},
|
|
1728
|
+
"CallbackInterfaceCloneTrylimboPluginMxf_RangeSink": {
|
|
1729
|
+
args: [FfiType.Handle],
|
|
1730
|
+
ret: FfiType.Handle,
|
|
1731
|
+
hasRustCallStatus: false
|
|
1732
|
+
},
|
|
1733
|
+
"CallbackInterfaceFreeTrylimboPluginMxf_RangeSink": {
|
|
1734
|
+
args: [FfiType.Handle],
|
|
1735
|
+
ret: FfiType.Void,
|
|
1736
|
+
hasRustCallStatus: false
|
|
1737
|
+
},
|
|
1738
|
+
"CallbackInterfaceTrylimboPluginMxfRangeSourceMethod0": {
|
|
1739
|
+
args: [
|
|
1740
|
+
FfiType.Handle,
|
|
1741
|
+
FfiType.Callback("ForeignFutureCompleteu64"),
|
|
1742
|
+
FfiType.Handle
|
|
1743
|
+
],
|
|
1744
|
+
ret: FfiType.Struct("ForeignFutureDroppedCallbackStruct"),
|
|
1745
|
+
hasRustCallStatus: false,
|
|
1746
|
+
outReturn: true
|
|
1747
|
+
},
|
|
1748
|
+
"CallbackInterfaceTrylimboPluginMxfRangeSourceMethod1": {
|
|
1749
|
+
args: [
|
|
1750
|
+
FfiType.Handle,
|
|
1751
|
+
FfiType.UInt64,
|
|
1752
|
+
FfiType.UInt32,
|
|
1753
|
+
FfiType.Callback("ForeignFutureCompleterust_buffer"),
|
|
1754
|
+
FfiType.Handle
|
|
1755
|
+
],
|
|
1756
|
+
ret: FfiType.Struct("ForeignFutureDroppedCallbackStruct"),
|
|
1757
|
+
hasRustCallStatus: false,
|
|
1758
|
+
outReturn: true
|
|
1759
|
+
},
|
|
1760
|
+
"CallbackInterfaceCloneTrylimboPluginMxf_RangeSource": {
|
|
1761
|
+
args: [FfiType.Handle],
|
|
1762
|
+
ret: FfiType.Handle,
|
|
1763
|
+
hasRustCallStatus: false
|
|
1764
|
+
},
|
|
1765
|
+
"CallbackInterfaceFreeTrylimboPluginMxf_RangeSource": {
|
|
1766
|
+
args: [FfiType.Handle],
|
|
1767
|
+
ret: FfiType.Void,
|
|
1768
|
+
hasRustCallStatus: false
|
|
1769
|
+
}
|
|
1770
|
+
},
|
|
1771
|
+
structs: {
|
|
1772
|
+
"ForeignFutureDroppedCallbackStruct": [{
|
|
1773
|
+
name: "handle",
|
|
1774
|
+
type: FfiType.Handle
|
|
1775
|
+
}, {
|
|
1776
|
+
name: "free",
|
|
1777
|
+
type: FfiType.Callback("ForeignFutureDroppedCallback")
|
|
1778
|
+
}],
|
|
1779
|
+
"ForeignFutureResultU64": [{
|
|
1780
|
+
name: "return_value",
|
|
1781
|
+
type: FfiType.UInt64
|
|
1782
|
+
}, {
|
|
1783
|
+
name: "call_status",
|
|
1784
|
+
type: FfiType.RustCallStatus
|
|
1785
|
+
}],
|
|
1786
|
+
"ForeignFutureResultRustBuffer": [{
|
|
1787
|
+
name: "return_value",
|
|
1788
|
+
type: FfiType.RustBuffer
|
|
1789
|
+
}, {
|
|
1790
|
+
name: "call_status",
|
|
1791
|
+
type: FfiType.RustCallStatus
|
|
1792
|
+
}],
|
|
1793
|
+
"ForeignFutureResultVoid": [{
|
|
1794
|
+
name: "call_status",
|
|
1795
|
+
type: FfiType.RustCallStatus
|
|
1796
|
+
}],
|
|
1797
|
+
"VTableCallbackInterfaceTrylimboPluginMxfRangeSink": [
|
|
1798
|
+
{
|
|
1799
|
+
name: "uniffi_free",
|
|
1800
|
+
type: FfiType.Callback("CallbackInterfaceFreeTrylimboPluginMxf_RangeSink")
|
|
1801
|
+
},
|
|
1802
|
+
{
|
|
1803
|
+
name: "uniffi_clone",
|
|
1804
|
+
type: FfiType.Callback("CallbackInterfaceCloneTrylimboPluginMxf_RangeSink")
|
|
1805
|
+
},
|
|
1806
|
+
{
|
|
1807
|
+
name: "length",
|
|
1808
|
+
type: FfiType.Callback("CallbackInterfaceTrylimboPluginMxfRangeSinkMethod0")
|
|
1809
|
+
},
|
|
1810
|
+
{
|
|
1811
|
+
name: "read_at",
|
|
1812
|
+
type: FfiType.Callback("CallbackInterfaceTrylimboPluginMxfRangeSinkMethod1")
|
|
1813
|
+
},
|
|
1814
|
+
{
|
|
1815
|
+
name: "write_at",
|
|
1816
|
+
type: FfiType.Callback("CallbackInterfaceTrylimboPluginMxfRangeSinkMethod2")
|
|
1817
|
+
},
|
|
1818
|
+
{
|
|
1819
|
+
name: "set_length",
|
|
1820
|
+
type: FfiType.Callback("CallbackInterfaceTrylimboPluginMxfRangeSinkMethod3")
|
|
1821
|
+
}
|
|
1822
|
+
],
|
|
1823
|
+
"VTableCallbackInterfaceTrylimboPluginMxfRangeSource": [
|
|
1824
|
+
{
|
|
1825
|
+
name: "uniffi_free",
|
|
1826
|
+
type: FfiType.Callback("CallbackInterfaceFreeTrylimboPluginMxf_RangeSource")
|
|
1827
|
+
},
|
|
1828
|
+
{
|
|
1829
|
+
name: "uniffi_clone",
|
|
1830
|
+
type: FfiType.Callback("CallbackInterfaceCloneTrylimboPluginMxf_RangeSource")
|
|
1831
|
+
},
|
|
1832
|
+
{
|
|
1833
|
+
name: "length",
|
|
1834
|
+
type: FfiType.Callback("CallbackInterfaceTrylimboPluginMxfRangeSourceMethod0")
|
|
1835
|
+
},
|
|
1836
|
+
{
|
|
1837
|
+
name: "read_at",
|
|
1838
|
+
type: FfiType.Callback("CallbackInterfaceTrylimboPluginMxfRangeSourceMethod1")
|
|
1839
|
+
}
|
|
1840
|
+
]
|
|
1841
|
+
}
|
|
1842
|
+
};
|
|
1843
|
+
let _nativeModule;
|
|
1844
|
+
const getter = () => {
|
|
1845
|
+
if (!_nativeModule) {
|
|
1846
|
+
const libPath = resolveLibPath({
|
|
1847
|
+
crateName: "trylimbo_plugin_mxf",
|
|
1848
|
+
callerUrl: import.meta.url,
|
|
1849
|
+
npmPackageBase: "@trylimbo/sdk-plugin-mxf-",
|
|
1850
|
+
tripleStyle: "node"
|
|
1851
|
+
});
|
|
1852
|
+
_nativeModule = UniffiNativeModule.open(libPath).register(DEFINITIONS);
|
|
1853
|
+
}
|
|
1854
|
+
return _nativeModule;
|
|
1855
|
+
};
|
|
1856
|
+
//#endregion
|
|
1857
|
+
//#region ../../../../../target/trylimbo/codegen/ffi-trylimbo_plugin_mxf/trylimbo_plugin_mxf.ts
|
|
1858
|
+
var trylimbo_plugin_mxf_exports = /* @__PURE__ */ __exportAll({
|
|
1859
|
+
Code: () => Code,
|
|
1860
|
+
FieldViolation: () => FieldViolation,
|
|
1861
|
+
MxfAuthor: () => MxfAuthor,
|
|
1862
|
+
MxfPlugin: () => MxfPlugin,
|
|
1863
|
+
Region: () => Region,
|
|
1864
|
+
SdkError: () => SdkError,
|
|
1865
|
+
SdkError_Tags: () => SdkError_Tags,
|
|
1866
|
+
default: () => trylimbo_plugin_mxf_default
|
|
1867
|
+
});
|
|
1868
|
+
const uniffiCaller = new UniffiRustCaller(() => ({ code: 0 }));
|
|
1869
|
+
const uniffiIsDebug = typeof process !== "object" || process?.env?.NODE_ENV !== "production" || false;
|
|
1870
|
+
const FfiConverterString = uniffiCreateFfiConverterString((() => {
|
|
1871
|
+
const encoder = new TextEncoder();
|
|
1872
|
+
const decoder = new TextDecoder();
|
|
1873
|
+
return {
|
|
1874
|
+
stringToBytes: (s) => encoder.encode(s),
|
|
1875
|
+
bytesToString: (ab) => decoder.decode(ab),
|
|
1876
|
+
stringByteLength: (s) => encoder.encode(s).byteLength,
|
|
1877
|
+
writeStringIntoBuffer: (s, buf, offset) => {
|
|
1878
|
+
const view = new Uint8Array(buf.arrayBuffer, offset, buf.arrayBuffer.byteLength - offset);
|
|
1879
|
+
return encoder.encodeInto(s, view).written;
|
|
1880
|
+
},
|
|
1881
|
+
readStringFromBuffer: (buf, offset, length) => decoder.decode(new Uint8Array(buf.arrayBuffer, offset, length))
|
|
1882
|
+
};
|
|
1883
|
+
})());
|
|
1884
|
+
/**
|
|
1885
|
+
* Generated factory for {@link FieldViolation} record objects.
|
|
1886
|
+
*/
|
|
1887
|
+
const FieldViolation = (() => {
|
|
1888
|
+
const defaults = () => ({});
|
|
1889
|
+
const create = (() => {
|
|
1890
|
+
return uniffiCreateRecord(defaults);
|
|
1891
|
+
})();
|
|
1892
|
+
return Object.freeze({
|
|
1893
|
+
create,
|
|
1894
|
+
new: create,
|
|
1895
|
+
defaults: () => Object.freeze(defaults())
|
|
1896
|
+
});
|
|
1897
|
+
})();
|
|
1898
|
+
const FfiConverterTypeFieldViolation = (() => {
|
|
1899
|
+
class FFIConverter extends AbstractFfiConverterByteArray {
|
|
1900
|
+
readFromCursor(c) {
|
|
1901
|
+
return {
|
|
1902
|
+
field: FfiConverterString.readFromCursor(c),
|
|
1903
|
+
description: FfiConverterString.readFromCursor(c),
|
|
1904
|
+
reason: FfiConverterString.readFromCursor(c)
|
|
1905
|
+
};
|
|
1906
|
+
}
|
|
1907
|
+
writeIntoCursor(value, c) {
|
|
1908
|
+
FfiConverterString.writeIntoCursor(value.field, c);
|
|
1909
|
+
FfiConverterString.writeIntoCursor(value.description, c);
|
|
1910
|
+
FfiConverterString.writeIntoCursor(value.reason, c);
|
|
1911
|
+
}
|
|
1912
|
+
allocationSize(value) {
|
|
1913
|
+
return FfiConverterString.allocationSize(value.field) + FfiConverterString.allocationSize(value.description) + FfiConverterString.allocationSize(value.reason);
|
|
1914
|
+
}
|
|
1915
|
+
}
|
|
1916
|
+
return new FFIConverter();
|
|
1917
|
+
})();
|
|
1918
|
+
/**
|
|
1919
|
+
* Generated factory for {@link Region} record objects.
|
|
1920
|
+
*/
|
|
1921
|
+
const Region = (() => {
|
|
1922
|
+
const defaults = () => ({});
|
|
1923
|
+
const create = (() => {
|
|
1924
|
+
return uniffiCreateRecord(defaults);
|
|
1925
|
+
})();
|
|
1926
|
+
return Object.freeze({
|
|
1927
|
+
create,
|
|
1928
|
+
new: create,
|
|
1929
|
+
defaults: () => Object.freeze(defaults())
|
|
1930
|
+
});
|
|
1931
|
+
})();
|
|
1932
|
+
const FfiConverterTypeRegion = (() => {
|
|
1933
|
+
class FFIConverter extends AbstractFfiConverterByteArray {
|
|
1934
|
+
readFromCursor(c) {
|
|
1935
|
+
return {
|
|
1936
|
+
offset: FfiConverterUInt64.readFromCursor(c),
|
|
1937
|
+
length: FfiConverterUInt64.readFromCursor(c)
|
|
1938
|
+
};
|
|
1939
|
+
}
|
|
1940
|
+
writeIntoCursor(value, c) {
|
|
1941
|
+
FfiConverterUInt64.writeIntoCursor(value.offset, c);
|
|
1942
|
+
FfiConverterUInt64.writeIntoCursor(value.length, c);
|
|
1943
|
+
}
|
|
1944
|
+
allocationSize(value) {
|
|
1945
|
+
return FfiConverterUInt64.allocationSize(value.offset) + FfiConverterUInt64.allocationSize(value.length);
|
|
1946
|
+
}
|
|
1947
|
+
}
|
|
1948
|
+
return new FFIConverter();
|
|
1949
|
+
})();
|
|
1950
|
+
/**
|
|
1951
|
+
* A canonical gRPC/Connect status code: the coarse, closed failure class.
|
|
1952
|
+
*
|
|
1953
|
+
* The wasm lane projects this as the Connect `snake_case` string, so a consumer
|
|
1954
|
+
* narrows on `err.code === "resource_exhausted"`; the native lane projects an enum.
|
|
1955
|
+
*/
|
|
1956
|
+
let Code = /* @__PURE__ */ function(Code) {
|
|
1957
|
+
Code[Code["Canceled"] = 0] = "Canceled";
|
|
1958
|
+
Code[Code["Unknown"] = 1] = "Unknown";
|
|
1959
|
+
Code[Code["InvalidArgument"] = 2] = "InvalidArgument";
|
|
1960
|
+
Code[Code["DeadlineExceeded"] = 3] = "DeadlineExceeded";
|
|
1961
|
+
Code[Code["NotFound"] = 4] = "NotFound";
|
|
1962
|
+
Code[Code["AlreadyExists"] = 5] = "AlreadyExists";
|
|
1963
|
+
Code[Code["PermissionDenied"] = 6] = "PermissionDenied";
|
|
1964
|
+
Code[Code["ResourceExhausted"] = 7] = "ResourceExhausted";
|
|
1965
|
+
Code[Code["FailedPrecondition"] = 8] = "FailedPrecondition";
|
|
1966
|
+
Code[Code["Aborted"] = 9] = "Aborted";
|
|
1967
|
+
Code[Code["OutOfRange"] = 10] = "OutOfRange";
|
|
1968
|
+
Code[Code["Unimplemented"] = 11] = "Unimplemented";
|
|
1969
|
+
Code[Code["Internal"] = 12] = "Internal";
|
|
1970
|
+
Code[Code["Unavailable"] = 13] = "Unavailable";
|
|
1971
|
+
Code[Code["DataLoss"] = 14] = "DataLoss";
|
|
1972
|
+
Code[Code["Unauthenticated"] = 15] = "Unauthenticated";
|
|
1973
|
+
return Code;
|
|
1974
|
+
}({});
|
|
1975
|
+
const FfiConverterTypeCode = (() => {
|
|
1976
|
+
class FFIConverter extends AbstractFfiConverterByteArray {
|
|
1977
|
+
readFromCursor(c) {
|
|
1978
|
+
switch (c.readI32()) {
|
|
1979
|
+
case 1: return 0;
|
|
1980
|
+
case 2: return 1;
|
|
1981
|
+
case 3: return 2;
|
|
1982
|
+
case 4: return 3;
|
|
1983
|
+
case 5: return 4;
|
|
1984
|
+
case 6: return 5;
|
|
1985
|
+
case 7: return 6;
|
|
1986
|
+
case 8: return 7;
|
|
1987
|
+
case 9: return 8;
|
|
1988
|
+
case 10: return 9;
|
|
1989
|
+
case 11: return 10;
|
|
1990
|
+
case 12: return 11;
|
|
1991
|
+
case 13: return 12;
|
|
1992
|
+
case 14: return 13;
|
|
1993
|
+
case 15: return 14;
|
|
1994
|
+
case 16: return 15;
|
|
1995
|
+
default: throw new UniffiInternalError.UnexpectedEnumCase();
|
|
1996
|
+
}
|
|
1997
|
+
}
|
|
1998
|
+
writeIntoCursor(value, c) {
|
|
1999
|
+
switch (value) {
|
|
2000
|
+
case 0: return c.writeI32(1);
|
|
2001
|
+
case 1: return c.writeI32(2);
|
|
2002
|
+
case 2: return c.writeI32(3);
|
|
2003
|
+
case 3: return c.writeI32(4);
|
|
2004
|
+
case 4: return c.writeI32(5);
|
|
2005
|
+
case 5: return c.writeI32(6);
|
|
2006
|
+
case 6: return c.writeI32(7);
|
|
2007
|
+
case 7: return c.writeI32(8);
|
|
2008
|
+
case 8: return c.writeI32(9);
|
|
2009
|
+
case 9: return c.writeI32(10);
|
|
2010
|
+
case 10: return c.writeI32(11);
|
|
2011
|
+
case 11: return c.writeI32(12);
|
|
2012
|
+
case 12: return c.writeI32(13);
|
|
2013
|
+
case 13: return c.writeI32(14);
|
|
2014
|
+
case 14: return c.writeI32(15);
|
|
2015
|
+
case 15: return c.writeI32(16);
|
|
2016
|
+
}
|
|
2017
|
+
}
|
|
2018
|
+
allocationSize(value) {
|
|
2019
|
+
return 4;
|
|
2020
|
+
}
|
|
2021
|
+
}
|
|
2022
|
+
return new FFIConverter();
|
|
2023
|
+
})();
|
|
2024
|
+
let SdkError_Tags = /* @__PURE__ */ function(SdkError_Tags) {
|
|
2025
|
+
SdkError_Tags["Reason"] = "Reason";
|
|
2026
|
+
SdkError_Tags["Invalid"] = "Invalid";
|
|
2027
|
+
SdkError_Tags["Status"] = "Status";
|
|
2028
|
+
return SdkError_Tags;
|
|
2029
|
+
}({});
|
|
2030
|
+
/**
|
|
2031
|
+
* The error every SDK call throws: a decoded `google.rpc.Status`, discriminated
|
|
2032
|
+
* as a semantic reason, a request validation, or a bare status. `code` and `message`
|
|
2033
|
+
* are common to every variant.
|
|
2034
|
+
*/
|
|
2035
|
+
const SdkError = (() => {
|
|
2036
|
+
/**
|
|
2037
|
+
* A semantic fault carrying a `google.rpc.ErrorInfo` reason.
|
|
2038
|
+
*/
|
|
2039
|
+
class Reason_ extends UniffiError {
|
|
2040
|
+
/**
|
|
2041
|
+
* @private
|
|
2042
|
+
* This field is private and should not be used, use `tag` instead.
|
|
2043
|
+
*/
|
|
2044
|
+
[uniffiTypeNameSymbol] = "SdkError";
|
|
2045
|
+
tag = "Reason";
|
|
2046
|
+
inner;
|
|
2047
|
+
constructor(inner) {
|
|
2048
|
+
super("SdkError", "Reason");
|
|
2049
|
+
this.inner = Object.freeze(inner);
|
|
2050
|
+
}
|
|
2051
|
+
static new(inner) {
|
|
2052
|
+
return new Reason_(inner);
|
|
2053
|
+
}
|
|
2054
|
+
static instanceOf(obj) {
|
|
2055
|
+
return obj.tag === "Reason";
|
|
2056
|
+
}
|
|
2057
|
+
static hasInner(obj) {
|
|
2058
|
+
return Reason_.instanceOf(obj);
|
|
2059
|
+
}
|
|
2060
|
+
static getInner(obj) {
|
|
2061
|
+
return obj.inner;
|
|
2062
|
+
}
|
|
2063
|
+
}
|
|
2064
|
+
/**
|
|
2065
|
+
* A request-validation fault: `google.rpc.BadRequest`.
|
|
2066
|
+
*/
|
|
2067
|
+
class Invalid_ extends UniffiError {
|
|
2068
|
+
/**
|
|
2069
|
+
* @private
|
|
2070
|
+
* This field is private and should not be used, use `tag` instead.
|
|
2071
|
+
*/
|
|
2072
|
+
[uniffiTypeNameSymbol] = "SdkError";
|
|
2073
|
+
tag = "Invalid";
|
|
2074
|
+
inner;
|
|
2075
|
+
constructor(inner) {
|
|
2076
|
+
super("SdkError", "Invalid");
|
|
2077
|
+
this.inner = Object.freeze(inner);
|
|
2078
|
+
}
|
|
2079
|
+
static new(inner) {
|
|
2080
|
+
return new Invalid_(inner);
|
|
2081
|
+
}
|
|
2082
|
+
static instanceOf(obj) {
|
|
2083
|
+
return obj.tag === "Invalid";
|
|
2084
|
+
}
|
|
2085
|
+
static hasInner(obj) {
|
|
2086
|
+
return Invalid_.instanceOf(obj);
|
|
2087
|
+
}
|
|
2088
|
+
static getInner(obj) {
|
|
2089
|
+
return obj.inner;
|
|
2090
|
+
}
|
|
2091
|
+
}
|
|
2092
|
+
/**
|
|
2093
|
+
* A status with no structured detail: a transport fault or a bare server status.
|
|
2094
|
+
*/
|
|
2095
|
+
class Status_ extends UniffiError {
|
|
2096
|
+
/**
|
|
2097
|
+
* @private
|
|
2098
|
+
* This field is private and should not be used, use `tag` instead.
|
|
2099
|
+
*/
|
|
2100
|
+
[uniffiTypeNameSymbol] = "SdkError";
|
|
2101
|
+
tag = "Status";
|
|
2102
|
+
inner;
|
|
2103
|
+
constructor(inner) {
|
|
2104
|
+
super("SdkError", "Status");
|
|
2105
|
+
this.inner = Object.freeze(inner);
|
|
2106
|
+
}
|
|
2107
|
+
static new(inner) {
|
|
2108
|
+
return new Status_(inner);
|
|
2109
|
+
}
|
|
2110
|
+
static instanceOf(obj) {
|
|
2111
|
+
return obj.tag === "Status";
|
|
2112
|
+
}
|
|
2113
|
+
static hasInner(obj) {
|
|
2114
|
+
return Status_.instanceOf(obj);
|
|
2115
|
+
}
|
|
2116
|
+
static getInner(obj) {
|
|
2117
|
+
return obj.inner;
|
|
2118
|
+
}
|
|
2119
|
+
}
|
|
2120
|
+
function instanceOf(obj) {
|
|
2121
|
+
return obj[uniffiTypeNameSymbol] === "SdkError";
|
|
2122
|
+
}
|
|
2123
|
+
return Object.freeze({
|
|
2124
|
+
instanceOf,
|
|
2125
|
+
Reason: Reason_,
|
|
2126
|
+
Invalid: Invalid_,
|
|
2127
|
+
Status: Status_
|
|
2128
|
+
});
|
|
2129
|
+
})();
|
|
2130
|
+
const FfiConverterTypeSdkError = (() => {
|
|
2131
|
+
class FFIConverter extends AbstractFfiConverterByteArray {
|
|
2132
|
+
readFromCursor(c) {
|
|
2133
|
+
switch (c.readI32()) {
|
|
2134
|
+
case 1: return new SdkError.Reason({
|
|
2135
|
+
code: FfiConverterTypeCode.readFromCursor(c),
|
|
2136
|
+
message: FfiConverterString.readFromCursor(c),
|
|
2137
|
+
reason: FfiConverterString.readFromCursor(c),
|
|
2138
|
+
domain: FfiConverterString.readFromCursor(c),
|
|
2139
|
+
metadata: FfiConverterMapStringString.readFromCursor(c)
|
|
2140
|
+
});
|
|
2141
|
+
case 2: return new SdkError.Invalid({
|
|
2142
|
+
code: FfiConverterTypeCode.readFromCursor(c),
|
|
2143
|
+
message: FfiConverterString.readFromCursor(c),
|
|
2144
|
+
fieldViolations: FfiConverterSequenceTypeFieldViolation.readFromCursor(c)
|
|
2145
|
+
});
|
|
2146
|
+
case 3: return new SdkError.Status({
|
|
2147
|
+
code: FfiConverterTypeCode.readFromCursor(c),
|
|
2148
|
+
message: FfiConverterString.readFromCursor(c)
|
|
2149
|
+
});
|
|
2150
|
+
default: throw new UniffiInternalError.UnexpectedEnumCase();
|
|
2151
|
+
}
|
|
2152
|
+
}
|
|
2153
|
+
writeIntoCursor(value, c) {
|
|
2154
|
+
switch (value.tag) {
|
|
2155
|
+
case "Reason": {
|
|
2156
|
+
c.writeI32(1);
|
|
2157
|
+
const inner = value.inner;
|
|
2158
|
+
FfiConverterTypeCode.writeIntoCursor(inner.code, c);
|
|
2159
|
+
FfiConverterString.writeIntoCursor(inner.message, c);
|
|
2160
|
+
FfiConverterString.writeIntoCursor(inner.reason, c);
|
|
2161
|
+
FfiConverterString.writeIntoCursor(inner.domain, c);
|
|
2162
|
+
FfiConverterMapStringString.writeIntoCursor(inner.metadata, c);
|
|
2163
|
+
return;
|
|
2164
|
+
}
|
|
2165
|
+
case "Invalid": {
|
|
2166
|
+
c.writeI32(2);
|
|
2167
|
+
const inner = value.inner;
|
|
2168
|
+
FfiConverterTypeCode.writeIntoCursor(inner.code, c);
|
|
2169
|
+
FfiConverterString.writeIntoCursor(inner.message, c);
|
|
2170
|
+
FfiConverterSequenceTypeFieldViolation.writeIntoCursor(inner.fieldViolations, c);
|
|
2171
|
+
return;
|
|
2172
|
+
}
|
|
2173
|
+
case "Status": {
|
|
2174
|
+
c.writeI32(3);
|
|
2175
|
+
const inner = value.inner;
|
|
2176
|
+
FfiConverterTypeCode.writeIntoCursor(inner.code, c);
|
|
2177
|
+
FfiConverterString.writeIntoCursor(inner.message, c);
|
|
2178
|
+
return;
|
|
2179
|
+
}
|
|
2180
|
+
default: throw new UniffiInternalError.UnexpectedEnumCase();
|
|
2181
|
+
}
|
|
2182
|
+
}
|
|
2183
|
+
allocationSize(value) {
|
|
2184
|
+
switch (value.tag) {
|
|
2185
|
+
case "Reason": {
|
|
2186
|
+
const inner = value.inner;
|
|
2187
|
+
let size = 4;
|
|
2188
|
+
size += FfiConverterTypeCode.allocationSize(inner.code);
|
|
2189
|
+
size += FfiConverterString.allocationSize(inner.message);
|
|
2190
|
+
size += FfiConverterString.allocationSize(inner.reason);
|
|
2191
|
+
size += FfiConverterString.allocationSize(inner.domain);
|
|
2192
|
+
size += FfiConverterMapStringString.allocationSize(inner.metadata);
|
|
2193
|
+
return size;
|
|
2194
|
+
}
|
|
2195
|
+
case "Invalid": {
|
|
2196
|
+
const inner = value.inner;
|
|
2197
|
+
let size = 4;
|
|
2198
|
+
size += FfiConverterTypeCode.allocationSize(inner.code);
|
|
2199
|
+
size += FfiConverterString.allocationSize(inner.message);
|
|
2200
|
+
size += FfiConverterSequenceTypeFieldViolation.allocationSize(inner.fieldViolations);
|
|
2201
|
+
return size;
|
|
2202
|
+
}
|
|
2203
|
+
case "Status": {
|
|
2204
|
+
const inner = value.inner;
|
|
2205
|
+
let size = 4;
|
|
2206
|
+
size += FfiConverterTypeCode.allocationSize(inner.code);
|
|
2207
|
+
size += FfiConverterString.allocationSize(inner.message);
|
|
2208
|
+
return size;
|
|
2209
|
+
}
|
|
2210
|
+
default: throw new UniffiInternalError.UnexpectedEnumCase();
|
|
2211
|
+
}
|
|
2212
|
+
}
|
|
2213
|
+
}
|
|
2214
|
+
return new FFIConverter();
|
|
2215
|
+
})();
|
|
2216
|
+
const uniffiCallbackInterfaceRangeSource = {
|
|
2217
|
+
vtable: {
|
|
2218
|
+
length: (uniffiHandle, uniffiFutureCallback, uniffiCallbackData) => {
|
|
2219
|
+
const uniffiMakeCall = async (signal) => {
|
|
2220
|
+
return await FfiConverterTypeRangeSource.lift(uniffiHandle).length({ signal });
|
|
2221
|
+
};
|
|
2222
|
+
const uniffiHandleSuccess = (returnValue) => {
|
|
2223
|
+
uniffiFutureCallback.call(uniffiFutureCallback, uniffiCallbackData, {
|
|
2224
|
+
return_value: FfiConverterUInt64.lower(returnValue, getter().rustbuffer_alloc),
|
|
2225
|
+
call_status: uniffiCaller.createCallStatus()
|
|
2226
|
+
});
|
|
2227
|
+
};
|
|
2228
|
+
const uniffiHandleError = (code, errorBuf) => {
|
|
2229
|
+
uniffiFutureCallback.call(uniffiFutureCallback, uniffiCallbackData, {
|
|
2230
|
+
return_value: BigInt(0),
|
|
2231
|
+
call_status: uniffiCaller.createErrorStatus(code, errorBuf)
|
|
2232
|
+
});
|
|
2233
|
+
};
|
|
2234
|
+
return uniffiTraitInterfaceCallAsyncWithError(uniffiMakeCall, uniffiHandleSuccess, uniffiHandleError, SdkError.instanceOf, FfiConverterTypeSdkError.lower.bind(FfiConverterTypeSdkError), FfiConverterString.lower.bind(FfiConverterString), getter().rustbuffer_alloc);
|
|
2235
|
+
},
|
|
2236
|
+
read_at: (uniffiHandle, offset, length, uniffiFutureCallback, uniffiCallbackData) => {
|
|
2237
|
+
const uniffiMakeCall = async (signal) => {
|
|
2238
|
+
return await FfiConverterTypeRangeSource.lift(uniffiHandle).readAt(FfiConverterUInt64.lift(offset), FfiConverterUInt32.lift(length), { signal });
|
|
2239
|
+
};
|
|
2240
|
+
const uniffiHandleSuccess = (returnValue) => {
|
|
2241
|
+
uniffiFutureCallback.call(uniffiFutureCallback, uniffiCallbackData, {
|
|
2242
|
+
return_value: FfiConverterArrayBuffer.lower(returnValue, getter().rustbuffer_alloc),
|
|
2243
|
+
call_status: uniffiCaller.createCallStatus()
|
|
2244
|
+
});
|
|
2245
|
+
};
|
|
2246
|
+
const uniffiHandleError = (code, errorBuf) => {
|
|
2247
|
+
uniffiFutureCallback.call(uniffiFutureCallback, uniffiCallbackData, {
|
|
2248
|
+
return_value: /* @__PURE__ */ new Uint8Array(0),
|
|
2249
|
+
call_status: uniffiCaller.createErrorStatus(code, errorBuf)
|
|
2250
|
+
});
|
|
2251
|
+
};
|
|
2252
|
+
return uniffiTraitInterfaceCallAsyncWithError(uniffiMakeCall, uniffiHandleSuccess, uniffiHandleError, SdkError.instanceOf, FfiConverterTypeSdkError.lower.bind(FfiConverterTypeSdkError), FfiConverterString.lower.bind(FfiConverterString), getter().rustbuffer_alloc);
|
|
2253
|
+
},
|
|
2254
|
+
uniffi_free: (uniffiHandle) => {
|
|
2255
|
+
FfiConverterTypeRangeSource.drop(uniffiHandle);
|
|
2256
|
+
},
|
|
2257
|
+
uniffi_clone: (uniffiHandle) => {
|
|
2258
|
+
return FfiConverterTypeRangeSource.clone(uniffiHandle);
|
|
2259
|
+
}
|
|
2260
|
+
},
|
|
2261
|
+
register: () => {
|
|
2262
|
+
getter().uniffi_trylimbo_plugin_mxf_fn_init_callback_vtable_rangesource(uniffiCallbackInterfaceRangeSource.vtable);
|
|
2263
|
+
}
|
|
2264
|
+
};
|
|
2265
|
+
const FfiConverterTypeRangeSource = new FfiConverterCallback();
|
|
2266
|
+
const uniffiCallbackInterfaceRangeSink = {
|
|
2267
|
+
vtable: {
|
|
2268
|
+
length: (uniffiHandle, uniffiFutureCallback, uniffiCallbackData) => {
|
|
2269
|
+
const uniffiMakeCall = async (signal) => {
|
|
2270
|
+
return await FfiConverterTypeRangeSink.lift(uniffiHandle).length({ signal });
|
|
2271
|
+
};
|
|
2272
|
+
const uniffiHandleSuccess = (returnValue) => {
|
|
2273
|
+
uniffiFutureCallback.call(uniffiFutureCallback, uniffiCallbackData, {
|
|
2274
|
+
return_value: FfiConverterUInt64.lower(returnValue, getter().rustbuffer_alloc),
|
|
2275
|
+
call_status: uniffiCaller.createCallStatus()
|
|
2276
|
+
});
|
|
2277
|
+
};
|
|
2278
|
+
const uniffiHandleError = (code, errorBuf) => {
|
|
2279
|
+
uniffiFutureCallback.call(uniffiFutureCallback, uniffiCallbackData, {
|
|
2280
|
+
return_value: BigInt(0),
|
|
2281
|
+
call_status: uniffiCaller.createErrorStatus(code, errorBuf)
|
|
2282
|
+
});
|
|
2283
|
+
};
|
|
2284
|
+
return uniffiTraitInterfaceCallAsyncWithError(uniffiMakeCall, uniffiHandleSuccess, uniffiHandleError, SdkError.instanceOf, FfiConverterTypeSdkError.lower.bind(FfiConverterTypeSdkError), FfiConverterString.lower.bind(FfiConverterString), getter().rustbuffer_alloc);
|
|
2285
|
+
},
|
|
2286
|
+
read_at: (uniffiHandle, offset, length, uniffiFutureCallback, uniffiCallbackData) => {
|
|
2287
|
+
const uniffiMakeCall = async (signal) => {
|
|
2288
|
+
return await FfiConverterTypeRangeSink.lift(uniffiHandle).readAt(FfiConverterUInt64.lift(offset), FfiConverterUInt32.lift(length), { signal });
|
|
2289
|
+
};
|
|
2290
|
+
const uniffiHandleSuccess = (returnValue) => {
|
|
2291
|
+
uniffiFutureCallback.call(uniffiFutureCallback, uniffiCallbackData, {
|
|
2292
|
+
return_value: FfiConverterArrayBuffer.lower(returnValue, getter().rustbuffer_alloc),
|
|
2293
|
+
call_status: uniffiCaller.createCallStatus()
|
|
2294
|
+
});
|
|
2295
|
+
};
|
|
2296
|
+
const uniffiHandleError = (code, errorBuf) => {
|
|
2297
|
+
uniffiFutureCallback.call(uniffiFutureCallback, uniffiCallbackData, {
|
|
2298
|
+
return_value: /* @__PURE__ */ new Uint8Array(0),
|
|
2299
|
+
call_status: uniffiCaller.createErrorStatus(code, errorBuf)
|
|
2300
|
+
});
|
|
2301
|
+
};
|
|
2302
|
+
return uniffiTraitInterfaceCallAsyncWithError(uniffiMakeCall, uniffiHandleSuccess, uniffiHandleError, SdkError.instanceOf, FfiConverterTypeSdkError.lower.bind(FfiConverterTypeSdkError), FfiConverterString.lower.bind(FfiConverterString), getter().rustbuffer_alloc);
|
|
2303
|
+
},
|
|
2304
|
+
write_at: (uniffiHandle, offset, data, uniffiFutureCallback, uniffiCallbackData) => {
|
|
2305
|
+
const uniffiMakeCall = async (signal) => {
|
|
2306
|
+
return await FfiConverterTypeRangeSink.lift(uniffiHandle).writeAt(FfiConverterUInt64.lift(offset), FfiConverterArrayBuffer.lift(data), { signal });
|
|
2307
|
+
};
|
|
2308
|
+
const uniffiHandleSuccess = (returnValue) => {
|
|
2309
|
+
uniffiFutureCallback.call(uniffiFutureCallback, uniffiCallbackData, { call_status: uniffiCaller.createCallStatus() });
|
|
2310
|
+
};
|
|
2311
|
+
const uniffiHandleError = (code, errorBuf) => {
|
|
2312
|
+
uniffiFutureCallback.call(uniffiFutureCallback, uniffiCallbackData, { call_status: uniffiCaller.createErrorStatus(code, errorBuf) });
|
|
2313
|
+
};
|
|
2314
|
+
return uniffiTraitInterfaceCallAsyncWithError(uniffiMakeCall, uniffiHandleSuccess, uniffiHandleError, SdkError.instanceOf, FfiConverterTypeSdkError.lower.bind(FfiConverterTypeSdkError), FfiConverterString.lower.bind(FfiConverterString), getter().rustbuffer_alloc);
|
|
2315
|
+
},
|
|
2316
|
+
set_length: (uniffiHandle, length, uniffiFutureCallback, uniffiCallbackData) => {
|
|
2317
|
+
const uniffiMakeCall = async (signal) => {
|
|
2318
|
+
return await FfiConverterTypeRangeSink.lift(uniffiHandle).setLength(FfiConverterUInt64.lift(length), { signal });
|
|
2319
|
+
};
|
|
2320
|
+
const uniffiHandleSuccess = (returnValue) => {
|
|
2321
|
+
uniffiFutureCallback.call(uniffiFutureCallback, uniffiCallbackData, { call_status: uniffiCaller.createCallStatus() });
|
|
2322
|
+
};
|
|
2323
|
+
const uniffiHandleError = (code, errorBuf) => {
|
|
2324
|
+
uniffiFutureCallback.call(uniffiFutureCallback, uniffiCallbackData, { call_status: uniffiCaller.createErrorStatus(code, errorBuf) });
|
|
2325
|
+
};
|
|
2326
|
+
return uniffiTraitInterfaceCallAsyncWithError(uniffiMakeCall, uniffiHandleSuccess, uniffiHandleError, SdkError.instanceOf, FfiConverterTypeSdkError.lower.bind(FfiConverterTypeSdkError), FfiConverterString.lower.bind(FfiConverterString), getter().rustbuffer_alloc);
|
|
2327
|
+
},
|
|
2328
|
+
uniffi_free: (uniffiHandle) => {
|
|
2329
|
+
FfiConverterTypeRangeSink.drop(uniffiHandle);
|
|
2330
|
+
},
|
|
2331
|
+
uniffi_clone: (uniffiHandle) => {
|
|
2332
|
+
return FfiConverterTypeRangeSink.clone(uniffiHandle);
|
|
2333
|
+
}
|
|
2334
|
+
},
|
|
2335
|
+
register: () => {
|
|
2336
|
+
getter().uniffi_trylimbo_plugin_mxf_fn_init_callback_vtable_rangesink(uniffiCallbackInterfaceRangeSink.vtable);
|
|
2337
|
+
}
|
|
2338
|
+
};
|
|
2339
|
+
const FfiConverterTypeRangeSink = new FfiConverterCallback();
|
|
2340
|
+
/**
|
|
2341
|
+
* MXF slot authoring, as the object a host registers on the issuer's `PluginRegistry`.
|
|
2342
|
+
*
|
|
2343
|
+
* The four methods mirror the issuer's `PluginAuthor` exactly. They are declared flat,
|
|
2344
|
+
* because UniFFI has no trait inheritance for foreign callbacks, so the generated binding
|
|
2345
|
+
* satisfies that interface as-is, with nothing in between.
|
|
2346
|
+
*/
|
|
2347
|
+
var MxfAuthor = class extends UniffiAbstractObject {
|
|
2348
|
+
[uniffiTypeNameSymbol] = "MxfAuthor";
|
|
2349
|
+
[destructorGuardSymbol];
|
|
2350
|
+
[pointerLiteralSymbol];
|
|
2351
|
+
constructor() {
|
|
2352
|
+
super();
|
|
2353
|
+
const pointer = uniffiCaller.rustCall((callStatus) => {
|
|
2354
|
+
return getter().uniffi_trylimbo_plugin_mxf_fn_constructor_mxfauthor_new(callStatus);
|
|
2355
|
+
}, FfiConverterString.lift.bind(FfiConverterString));
|
|
2356
|
+
this[pointerLiteralSymbol] = pointer;
|
|
2357
|
+
this[destructorGuardSymbol] = uniffiTypeMxfAuthorObjectFactory.bless(pointer);
|
|
2358
|
+
}
|
|
2359
|
+
/**
|
|
2360
|
+
* The manifest window(s), or empty when the asset carries none. Byte-identical whether
|
|
2361
|
+
* the slot is empty, filled or zeroed: the SDK round-trips this and fails the sign if
|
|
2362
|
+
* it drifts.
|
|
2363
|
+
*
|
|
2364
|
+
* # Errors
|
|
2365
|
+
*
|
|
2366
|
+
* [`SdkError`] when the source cannot be read or the MXF structure is malformed.
|
|
2367
|
+
*/
|
|
2368
|
+
async locate(src, asyncOpts_) {
|
|
2369
|
+
const __stack = uniffiIsDebug ? (/* @__PURE__ */ new Error()).stack : void 0;
|
|
2370
|
+
try {
|
|
2371
|
+
return await uniffiRustCallAsync(uniffiCaller, () => {
|
|
2372
|
+
return getter().uniffi_trylimbo_plugin_mxf_fn_method_mxfauthor_locate(uniffiTypeMxfAuthorObjectFactory.clonePointer(this), FfiConverterTypeRangeSource.lower(src, getter().rustbuffer_alloc));
|
|
2373
|
+
}, getter().ffi_trylimbo_plugin_mxf_rust_future_poll_rust_buffer, getter().ffi_trylimbo_plugin_mxf_rust_future_cancel_rust_buffer, getter().ffi_trylimbo_plugin_mxf_rust_future_complete_rust_buffer, getter().ffi_trylimbo_plugin_mxf_rust_future_free_rust_buffer, (__rb) => {
|
|
2374
|
+
try {
|
|
2375
|
+
return FfiConverterSequenceTypeRegion.lift(__rb);
|
|
2376
|
+
} finally {
|
|
2377
|
+
getter().rustbuffer_free(__rb);
|
|
2378
|
+
}
|
|
2379
|
+
}, FfiConverterString.lift.bind(FfiConverterString), asyncOpts_, FfiConverterTypeSdkError.lift.bind(FfiConverterTypeSdkError));
|
|
2380
|
+
} catch (__error) {
|
|
2381
|
+
if (uniffiIsDebug && __error instanceof Error) __error.stack = __stack;
|
|
2382
|
+
throw __error;
|
|
2383
|
+
}
|
|
2384
|
+
}
|
|
2385
|
+
/**
|
|
2386
|
+
* The media types this plugin owns. The SDK asserts any `sniff` result is a member.
|
|
2387
|
+
*/
|
|
2388
|
+
mediaTypes() {
|
|
2389
|
+
const __rb = uniffiCaller.rustCall((callStatus) => {
|
|
2390
|
+
return getter().uniffi_trylimbo_plugin_mxf_fn_method_mxfauthor_media_types(uniffiTypeMxfAuthorObjectFactory.clonePointer(this), callStatus);
|
|
2391
|
+
}, FfiConverterString.lift.bind(FfiConverterString));
|
|
2392
|
+
try {
|
|
2393
|
+
return FfiConverterSequenceString.lift(__rb);
|
|
2394
|
+
} finally {
|
|
2395
|
+
getter().rustbuffer_free(__rb);
|
|
2396
|
+
}
|
|
2397
|
+
}
|
|
2398
|
+
/**
|
|
2399
|
+
* Reserve `reserve` bytes of manifest slot by writing MXF structure through `dst`, and
|
|
2400
|
+
* return exactly where it landed. Never embeds: the SDK writes the signed manifest into
|
|
2401
|
+
* the returned regions.
|
|
2402
|
+
*
|
|
2403
|
+
* # Errors
|
|
2404
|
+
*
|
|
2405
|
+
* [`SdkError`] when the sink cannot be written or `reserve` exceeds a `u32` slot.
|
|
2406
|
+
*/
|
|
2407
|
+
async reserveSlot(dst, reserve, asyncOpts_) {
|
|
2408
|
+
const __stack = uniffiIsDebug ? (/* @__PURE__ */ new Error()).stack : void 0;
|
|
2409
|
+
try {
|
|
2410
|
+
return await uniffiRustCallAsync(uniffiCaller, () => {
|
|
2411
|
+
return getter().uniffi_trylimbo_plugin_mxf_fn_method_mxfauthor_reserve_slot(uniffiTypeMxfAuthorObjectFactory.clonePointer(this), FfiConverterTypeRangeSink.lower(dst, getter().rustbuffer_alloc), FfiConverterUInt64.lower(reserve, getter().rustbuffer_alloc));
|
|
2412
|
+
}, getter().ffi_trylimbo_plugin_mxf_rust_future_poll_rust_buffer, getter().ffi_trylimbo_plugin_mxf_rust_future_cancel_rust_buffer, getter().ffi_trylimbo_plugin_mxf_rust_future_complete_rust_buffer, getter().ffi_trylimbo_plugin_mxf_rust_future_free_rust_buffer, (__rb) => {
|
|
2413
|
+
try {
|
|
2414
|
+
return FfiConverterSequenceTypeRegion.lift(__rb);
|
|
2415
|
+
} finally {
|
|
2416
|
+
getter().rustbuffer_free(__rb);
|
|
2417
|
+
}
|
|
2418
|
+
}, FfiConverterString.lift.bind(FfiConverterString), asyncOpts_, FfiConverterTypeSdkError.lift.bind(FfiConverterTypeSdkError));
|
|
2419
|
+
} catch (__error) {
|
|
2420
|
+
if (uniffiIsDebug && __error instanceof Error) __error.stack = __stack;
|
|
2421
|
+
throw __error;
|
|
2422
|
+
}
|
|
2423
|
+
}
|
|
2424
|
+
/**
|
|
2425
|
+
* Recognize MXF from the real bytes, or `None` to decline.
|
|
2426
|
+
*
|
|
2427
|
+
* # Errors
|
|
2428
|
+
*
|
|
2429
|
+
* [`SdkError`] when the source cannot be read.
|
|
2430
|
+
*/
|
|
2431
|
+
async sniff(src, asyncOpts_) {
|
|
2432
|
+
const __stack = uniffiIsDebug ? (/* @__PURE__ */ new Error()).stack : void 0;
|
|
2433
|
+
try {
|
|
2434
|
+
return await uniffiRustCallAsync(uniffiCaller, () => {
|
|
2435
|
+
return getter().uniffi_trylimbo_plugin_mxf_fn_method_mxfauthor_sniff(uniffiTypeMxfAuthorObjectFactory.clonePointer(this), FfiConverterTypeRangeSource.lower(src, getter().rustbuffer_alloc));
|
|
2436
|
+
}, getter().ffi_trylimbo_plugin_mxf_rust_future_poll_rust_buffer, getter().ffi_trylimbo_plugin_mxf_rust_future_cancel_rust_buffer, getter().ffi_trylimbo_plugin_mxf_rust_future_complete_rust_buffer, getter().ffi_trylimbo_plugin_mxf_rust_future_free_rust_buffer, (__rb) => {
|
|
2437
|
+
try {
|
|
2438
|
+
return FfiConverterOptionalString.lift(__rb);
|
|
2439
|
+
} finally {
|
|
2440
|
+
getter().rustbuffer_free(__rb);
|
|
2441
|
+
}
|
|
2442
|
+
}, FfiConverterString.lift.bind(FfiConverterString), asyncOpts_, FfiConverterTypeSdkError.lift.bind(FfiConverterTypeSdkError));
|
|
2443
|
+
} catch (__error) {
|
|
2444
|
+
if (uniffiIsDebug && __error instanceof Error) __error.stack = __stack;
|
|
2445
|
+
throw __error;
|
|
2446
|
+
}
|
|
2447
|
+
}
|
|
2448
|
+
uniffiDestroy() {
|
|
2449
|
+
const ptr = this[destructorGuardSymbol];
|
|
2450
|
+
if (ptr !== void 0) {
|
|
2451
|
+
const pointer = uniffiTypeMxfAuthorObjectFactory.pointer(this);
|
|
2452
|
+
uniffiTypeMxfAuthorObjectFactory.freePointer(pointer);
|
|
2453
|
+
uniffiTypeMxfAuthorObjectFactory.unbless(ptr);
|
|
2454
|
+
delete this[destructorGuardSymbol];
|
|
2455
|
+
}
|
|
2456
|
+
}
|
|
2457
|
+
static instanceOf(obj_) {
|
|
2458
|
+
return uniffiTypeMxfAuthorObjectFactory.isConcreteType(obj_);
|
|
2459
|
+
}
|
|
2460
|
+
};
|
|
2461
|
+
const uniffiTypeMxfAuthorObjectFactory = (() => {
|
|
2462
|
+
const registry = typeof FinalizationRegistry !== "undefined" ? new FinalizationRegistry((heldValue) => {
|
|
2463
|
+
uniffiTypeMxfAuthorObjectFactory.freePointer(heldValue);
|
|
2464
|
+
}) : null;
|
|
2465
|
+
return {
|
|
2466
|
+
create(pointer) {
|
|
2467
|
+
const instance = Object.create(MxfAuthor.prototype);
|
|
2468
|
+
instance[pointerLiteralSymbol] = pointer;
|
|
2469
|
+
instance[destructorGuardSymbol] = this.bless(pointer);
|
|
2470
|
+
instance[uniffiTypeNameSymbol] = "MxfAuthor";
|
|
2471
|
+
return instance;
|
|
2472
|
+
},
|
|
2473
|
+
bless(p) {
|
|
2474
|
+
const ptr = {
|
|
2475
|
+
p,
|
|
2476
|
+
markDestroyed: () => void 0
|
|
2477
|
+
};
|
|
2478
|
+
if (registry) registry.register(ptr, p, ptr);
|
|
2479
|
+
return ptr;
|
|
2480
|
+
},
|
|
2481
|
+
unbless(ptr_) {
|
|
2482
|
+
if (registry) registry.unregister(ptr_);
|
|
2483
|
+
},
|
|
2484
|
+
pointer(obj_) {
|
|
2485
|
+
if (obj_[destructorGuardSymbol] === void 0) throw new UniffiInternalError.UnexpectedNullPointer();
|
|
2486
|
+
return obj_[pointerLiteralSymbol];
|
|
2487
|
+
},
|
|
2488
|
+
clonePointer(obj_) {
|
|
2489
|
+
const pointer = this.pointer(obj_);
|
|
2490
|
+
return uniffiCaller.rustCall((callStatus) => getter().uniffi_trylimbo_plugin_mxf_fn_clone_mxfauthor(pointer, callStatus), FfiConverterString.lift);
|
|
2491
|
+
},
|
|
2492
|
+
freePointer(pointer) {
|
|
2493
|
+
uniffiCaller.rustCall((callStatus) => getter().uniffi_trylimbo_plugin_mxf_fn_free_mxfauthor(pointer, callStatus), FfiConverterString.lift);
|
|
2494
|
+
},
|
|
2495
|
+
isConcreteType(obj_) {
|
|
2496
|
+
return obj_[destructorGuardSymbol] && obj_[uniffiTypeNameSymbol] === "MxfAuthor";
|
|
2497
|
+
}
|
|
2498
|
+
};
|
|
2499
|
+
})();
|
|
2500
|
+
const FfiConverterTypeMxfAuthor = new FfiConverterObject(uniffiTypeMxfAuthorObjectFactory);
|
|
2501
|
+
/**
|
|
2502
|
+
* MXF reading, as the object a host registers on the verifier's `PluginRegistry`.
|
|
2503
|
+
*
|
|
2504
|
+
* The three methods mirror the verifier's `PluginRead` exactly, so the generated binding
|
|
2505
|
+
* satisfies that interface as-is. Carries no libMXF++: locating a slot is pure Rust.
|
|
2506
|
+
*/
|
|
2507
|
+
var MxfPlugin = class extends UniffiAbstractObject {
|
|
2508
|
+
[uniffiTypeNameSymbol] = "MxfPlugin";
|
|
2509
|
+
[destructorGuardSymbol];
|
|
2510
|
+
[pointerLiteralSymbol];
|
|
2511
|
+
constructor() {
|
|
2512
|
+
super();
|
|
2513
|
+
const pointer = uniffiCaller.rustCall((callStatus) => {
|
|
2514
|
+
return getter().uniffi_trylimbo_plugin_mxf_fn_constructor_mxfplugin_new(callStatus);
|
|
2515
|
+
}, FfiConverterString.lift.bind(FfiConverterString));
|
|
2516
|
+
this[pointerLiteralSymbol] = pointer;
|
|
2517
|
+
this[destructorGuardSymbol] = uniffiTypeMxfPluginObjectFactory.bless(pointer);
|
|
2518
|
+
}
|
|
2519
|
+
/**
|
|
2520
|
+
* The manifest window(s), or empty when the asset carries none. What the verifier hashes
|
|
2521
|
+
* around: everything reported here is excluded from the signed content hash.
|
|
2522
|
+
*
|
|
2523
|
+
* # Errors
|
|
2524
|
+
*
|
|
2525
|
+
* [`SdkError`] when the source cannot be read or the MXF structure is malformed.
|
|
2526
|
+
*/
|
|
2527
|
+
async locate(src, asyncOpts_) {
|
|
2528
|
+
const __stack = uniffiIsDebug ? (/* @__PURE__ */ new Error()).stack : void 0;
|
|
2529
|
+
try {
|
|
2530
|
+
return await uniffiRustCallAsync(uniffiCaller, () => {
|
|
2531
|
+
return getter().uniffi_trylimbo_plugin_mxf_fn_method_mxfplugin_locate(uniffiTypeMxfPluginObjectFactory.clonePointer(this), FfiConverterTypeRangeSource.lower(src, getter().rustbuffer_alloc));
|
|
2532
|
+
}, getter().ffi_trylimbo_plugin_mxf_rust_future_poll_rust_buffer, getter().ffi_trylimbo_plugin_mxf_rust_future_cancel_rust_buffer, getter().ffi_trylimbo_plugin_mxf_rust_future_complete_rust_buffer, getter().ffi_trylimbo_plugin_mxf_rust_future_free_rust_buffer, (__rb) => {
|
|
2533
|
+
try {
|
|
2534
|
+
return FfiConverterSequenceTypeRegion.lift(__rb);
|
|
2535
|
+
} finally {
|
|
2536
|
+
getter().rustbuffer_free(__rb);
|
|
2537
|
+
}
|
|
2538
|
+
}, FfiConverterString.lift.bind(FfiConverterString), asyncOpts_, FfiConverterTypeSdkError.lift.bind(FfiConverterTypeSdkError));
|
|
2539
|
+
} catch (__error) {
|
|
2540
|
+
if (uniffiIsDebug && __error instanceof Error) __error.stack = __stack;
|
|
2541
|
+
throw __error;
|
|
2542
|
+
}
|
|
2543
|
+
}
|
|
2544
|
+
/**
|
|
2545
|
+
* The media types this plugin owns. The SDK asserts any `sniff` result is a member.
|
|
2546
|
+
*/
|
|
2547
|
+
mediaTypes() {
|
|
2548
|
+
const __rb = uniffiCaller.rustCall((callStatus) => {
|
|
2549
|
+
return getter().uniffi_trylimbo_plugin_mxf_fn_method_mxfplugin_media_types(uniffiTypeMxfPluginObjectFactory.clonePointer(this), callStatus);
|
|
2550
|
+
}, FfiConverterString.lift.bind(FfiConverterString));
|
|
2551
|
+
try {
|
|
2552
|
+
return FfiConverterSequenceString.lift(__rb);
|
|
2553
|
+
} finally {
|
|
2554
|
+
getter().rustbuffer_free(__rb);
|
|
2555
|
+
}
|
|
2556
|
+
}
|
|
2557
|
+
/**
|
|
2558
|
+
* Recognize MXF from the real bytes, or `None` to decline.
|
|
2559
|
+
*
|
|
2560
|
+
* # Errors
|
|
2561
|
+
*
|
|
2562
|
+
* [`SdkError`] when the source cannot be read.
|
|
2563
|
+
*/
|
|
2564
|
+
async sniff(src, asyncOpts_) {
|
|
2565
|
+
const __stack = uniffiIsDebug ? (/* @__PURE__ */ new Error()).stack : void 0;
|
|
2566
|
+
try {
|
|
2567
|
+
return await uniffiRustCallAsync(uniffiCaller, () => {
|
|
2568
|
+
return getter().uniffi_trylimbo_plugin_mxf_fn_method_mxfplugin_sniff(uniffiTypeMxfPluginObjectFactory.clonePointer(this), FfiConverterTypeRangeSource.lower(src, getter().rustbuffer_alloc));
|
|
2569
|
+
}, getter().ffi_trylimbo_plugin_mxf_rust_future_poll_rust_buffer, getter().ffi_trylimbo_plugin_mxf_rust_future_cancel_rust_buffer, getter().ffi_trylimbo_plugin_mxf_rust_future_complete_rust_buffer, getter().ffi_trylimbo_plugin_mxf_rust_future_free_rust_buffer, (__rb) => {
|
|
2570
|
+
try {
|
|
2571
|
+
return FfiConverterOptionalString.lift(__rb);
|
|
2572
|
+
} finally {
|
|
2573
|
+
getter().rustbuffer_free(__rb);
|
|
2574
|
+
}
|
|
2575
|
+
}, FfiConverterString.lift.bind(FfiConverterString), asyncOpts_, FfiConverterTypeSdkError.lift.bind(FfiConverterTypeSdkError));
|
|
2576
|
+
} catch (__error) {
|
|
2577
|
+
if (uniffiIsDebug && __error instanceof Error) __error.stack = __stack;
|
|
2578
|
+
throw __error;
|
|
2579
|
+
}
|
|
2580
|
+
}
|
|
2581
|
+
uniffiDestroy() {
|
|
2582
|
+
const ptr = this[destructorGuardSymbol];
|
|
2583
|
+
if (ptr !== void 0) {
|
|
2584
|
+
const pointer = uniffiTypeMxfPluginObjectFactory.pointer(this);
|
|
2585
|
+
uniffiTypeMxfPluginObjectFactory.freePointer(pointer);
|
|
2586
|
+
uniffiTypeMxfPluginObjectFactory.unbless(ptr);
|
|
2587
|
+
delete this[destructorGuardSymbol];
|
|
2588
|
+
}
|
|
2589
|
+
}
|
|
2590
|
+
static instanceOf(obj_) {
|
|
2591
|
+
return uniffiTypeMxfPluginObjectFactory.isConcreteType(obj_);
|
|
2592
|
+
}
|
|
2593
|
+
};
|
|
2594
|
+
const uniffiTypeMxfPluginObjectFactory = (() => {
|
|
2595
|
+
const registry = typeof FinalizationRegistry !== "undefined" ? new FinalizationRegistry((heldValue) => {
|
|
2596
|
+
uniffiTypeMxfPluginObjectFactory.freePointer(heldValue);
|
|
2597
|
+
}) : null;
|
|
2598
|
+
return {
|
|
2599
|
+
create(pointer) {
|
|
2600
|
+
const instance = Object.create(MxfPlugin.prototype);
|
|
2601
|
+
instance[pointerLiteralSymbol] = pointer;
|
|
2602
|
+
instance[destructorGuardSymbol] = this.bless(pointer);
|
|
2603
|
+
instance[uniffiTypeNameSymbol] = "MxfPlugin";
|
|
2604
|
+
return instance;
|
|
2605
|
+
},
|
|
2606
|
+
bless(p) {
|
|
2607
|
+
const ptr = {
|
|
2608
|
+
p,
|
|
2609
|
+
markDestroyed: () => void 0
|
|
2610
|
+
};
|
|
2611
|
+
if (registry) registry.register(ptr, p, ptr);
|
|
2612
|
+
return ptr;
|
|
2613
|
+
},
|
|
2614
|
+
unbless(ptr_) {
|
|
2615
|
+
if (registry) registry.unregister(ptr_);
|
|
2616
|
+
},
|
|
2617
|
+
pointer(obj_) {
|
|
2618
|
+
if (obj_[destructorGuardSymbol] === void 0) throw new UniffiInternalError.UnexpectedNullPointer();
|
|
2619
|
+
return obj_[pointerLiteralSymbol];
|
|
2620
|
+
},
|
|
2621
|
+
clonePointer(obj_) {
|
|
2622
|
+
const pointer = this.pointer(obj_);
|
|
2623
|
+
return uniffiCaller.rustCall((callStatus) => getter().uniffi_trylimbo_plugin_mxf_fn_clone_mxfplugin(pointer, callStatus), FfiConverterString.lift);
|
|
2624
|
+
},
|
|
2625
|
+
freePointer(pointer) {
|
|
2626
|
+
uniffiCaller.rustCall((callStatus) => getter().uniffi_trylimbo_plugin_mxf_fn_free_mxfplugin(pointer, callStatus), FfiConverterString.lift);
|
|
2627
|
+
},
|
|
2628
|
+
isConcreteType(obj_) {
|
|
2629
|
+
return obj_[destructorGuardSymbol] && obj_[uniffiTypeNameSymbol] === "MxfPlugin";
|
|
2630
|
+
}
|
|
2631
|
+
};
|
|
2632
|
+
})();
|
|
2633
|
+
const FfiConverterTypeMxfPlugin = new FfiConverterObject(uniffiTypeMxfPluginObjectFactory);
|
|
2634
|
+
const FfiConverterMapStringString = new FfiConverterMap(FfiConverterString, FfiConverterString);
|
|
2635
|
+
const FfiConverterSequenceTypeFieldViolation = new FfiConverterArray(FfiConverterTypeFieldViolation);
|
|
2636
|
+
const FfiConverterSequenceTypeRegion = new FfiConverterArray(FfiConverterTypeRegion);
|
|
2637
|
+
const FfiConverterSequenceString = new FfiConverterArray(FfiConverterString);
|
|
2638
|
+
const FfiConverterOptionalString = new FfiConverterOptional(FfiConverterString);
|
|
2639
|
+
/**
|
|
2640
|
+
* This should be called before anything else.
|
|
2641
|
+
*
|
|
2642
|
+
* It is likely that this is being done for you by the library's `index.ts`.
|
|
2643
|
+
*
|
|
2644
|
+
* It checks versions of uniffi between when the Rust scaffolding was generated
|
|
2645
|
+
* and when the bindings were generated.
|
|
2646
|
+
*
|
|
2647
|
+
* It also initializes the machinery to enable Rust to talk back to Javascript.
|
|
2648
|
+
*/
|
|
2649
|
+
function uniffiEnsureInitialized() {
|
|
2650
|
+
const bindingsContractVersion = 30;
|
|
2651
|
+
const scaffoldingContractVersion = getter().ffi_trylimbo_plugin_mxf_uniffi_contract_version();
|
|
2652
|
+
if (bindingsContractVersion !== scaffoldingContractVersion) throw new UniffiInternalError.ContractVersionMismatch(scaffoldingContractVersion, bindingsContractVersion);
|
|
2653
|
+
if (getter().uniffi_trylimbo_plugin_mxf_checksum_constructor_mxfauthor_new() !== 26244) throw new UniffiInternalError.ApiChecksumMismatch("uniffi_trylimbo_plugin_mxf_checksum_constructor_mxfauthor_new");
|
|
2654
|
+
if (getter().uniffi_trylimbo_plugin_mxf_checksum_method_mxfauthor_locate() !== 45199) throw new UniffiInternalError.ApiChecksumMismatch("uniffi_trylimbo_plugin_mxf_checksum_method_mxfauthor_locate");
|
|
2655
|
+
if (getter().uniffi_trylimbo_plugin_mxf_checksum_method_mxfauthor_media_types() !== 26985) throw new UniffiInternalError.ApiChecksumMismatch("uniffi_trylimbo_plugin_mxf_checksum_method_mxfauthor_media_types");
|
|
2656
|
+
if (getter().uniffi_trylimbo_plugin_mxf_checksum_method_mxfauthor_reserve_slot() !== 48309) throw new UniffiInternalError.ApiChecksumMismatch("uniffi_trylimbo_plugin_mxf_checksum_method_mxfauthor_reserve_slot");
|
|
2657
|
+
if (getter().uniffi_trylimbo_plugin_mxf_checksum_method_mxfauthor_sniff() !== 42367) throw new UniffiInternalError.ApiChecksumMismatch("uniffi_trylimbo_plugin_mxf_checksum_method_mxfauthor_sniff");
|
|
2658
|
+
if (getter().uniffi_trylimbo_plugin_mxf_checksum_constructor_mxfplugin_new() !== 63791) throw new UniffiInternalError.ApiChecksumMismatch("uniffi_trylimbo_plugin_mxf_checksum_constructor_mxfplugin_new");
|
|
2659
|
+
if (getter().uniffi_trylimbo_plugin_mxf_checksum_method_mxfplugin_locate() !== 1210) throw new UniffiInternalError.ApiChecksumMismatch("uniffi_trylimbo_plugin_mxf_checksum_method_mxfplugin_locate");
|
|
2660
|
+
if (getter().uniffi_trylimbo_plugin_mxf_checksum_method_mxfplugin_media_types() !== 44782) throw new UniffiInternalError.ApiChecksumMismatch("uniffi_trylimbo_plugin_mxf_checksum_method_mxfplugin_media_types");
|
|
2661
|
+
if (getter().uniffi_trylimbo_plugin_mxf_checksum_method_mxfplugin_sniff() !== 48535) throw new UniffiInternalError.ApiChecksumMismatch("uniffi_trylimbo_plugin_mxf_checksum_method_mxfplugin_sniff");
|
|
2662
|
+
uniffiCallbackInterfaceRangeSource.register();
|
|
2663
|
+
uniffiCallbackInterfaceRangeSink.register();
|
|
2664
|
+
}
|
|
2665
|
+
var trylimbo_plugin_mxf_default = Object.freeze({
|
|
2666
|
+
initialize: uniffiEnsureInitialized,
|
|
2667
|
+
converters: {
|
|
2668
|
+
FfiConverterTypeCode,
|
|
2669
|
+
FfiConverterTypeFieldViolation,
|
|
2670
|
+
FfiConverterTypeMxfAuthor,
|
|
2671
|
+
FfiConverterTypeMxfPlugin,
|
|
2672
|
+
FfiConverterTypeRegion,
|
|
2673
|
+
FfiConverterTypeSdkError
|
|
2674
|
+
}
|
|
2675
|
+
});
|
|
2676
|
+
//#endregion
|
|
2677
|
+
//#region ../../../../../target/trylimbo/codegen/ffi-trylimbo_plugin_mxf/index.ts
|
|
2678
|
+
let initialized = false;
|
|
2679
|
+
if (!initialized) {
|
|
2680
|
+
trylimbo_plugin_mxf_default.initialize();
|
|
2681
|
+
initialized = true;
|
|
2682
|
+
}
|
|
2683
|
+
async function uniffiInitAsync() {}
|
|
2684
|
+
var ffi_trylimbo_plugin_mxf_default = { trylimbo_plugin_mxf: trylimbo_plugin_mxf_exports };
|
|
2685
|
+
//#endregion
|
|
2686
|
+
export { Code, FieldViolation, MxfAuthor, MxfPlugin, Region, SdkError, SdkError_Tags, ffi_trylimbo_plugin_mxf_default as default, uniffiInitAsync };
|