Skip to content

Commit 7493164

Browse files
authored
[Web] Fix incorrect FFI export name in runtime.ts (#18686)
## Why The code was using the TypeScript type name `FTVMFFIErrorSetRaisedFromCStr` instead of the actual C function export name `TVMFFIErrorSetRaisedFromCStr`. The F prefix is a naming convention for TypeScript function types, not the actual export names, which would make RPC run into error in my local test. ## How `lib.exports.FTVMFFIErrorSetRaisedFromCStr` --> `lib.exports.TVMFFIErrorSetRaisedFromCStr` to match the C function name defined in ctypes.ts.
1 parent 78b5ed0 commit 7493164

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

web/src/runtime.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2146,7 +2146,7 @@ export class Instance implements Disposable {
21462146
const errMsgOffset = stack.allocRawBytes(errMsg.length + 1);
21472147
stack.storeRawBytes(errMsgOffset, StringToUint8Array(errMsg));
21482148
stack.commitToWasmMemory();
2149-
(this.lib.exports.FTVMFFIErrorSetRaisedFromCStr as ctypes.FTVMFFIErrorSetRaisedFromCStr)(
2149+
(this.lib.exports.TVMFFIErrorSetRaisedFromCStr as ctypes.FTVMFFIErrorSetRaisedFromCStr)(
21502150
stack.ptrFromOffset(errKindOffset),
21512151
stack.ptrFromOffset(errMsgOffset)
21522152
);

0 commit comments

Comments
 (0)