This is an automated email from the ASF dual-hosted git repository.

tqchen pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/tvm.git


The following commit(s) were added to refs/heads/main by this push:
     new 7493164345 [Web] Fix incorrect FFI export name in runtime.ts (#18686)
7493164345 is described below

commit 74931643457b15513d04afb87750ade181ba144f
Author: Guan-Ming (Wesley) Chiu <[email protected]>
AuthorDate: Sat Jan 24 00:17:21 2026 +0800

    [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.
---
 web/src/runtime.ts | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/web/src/runtime.ts b/web/src/runtime.ts
index 41bc43b54c..edc09f4e0f 100644
--- a/web/src/runtime.ts
+++ b/web/src/runtime.ts
@@ -2146,7 +2146,7 @@ export class Instance implements Disposable {
         const errMsgOffset = stack.allocRawBytes(errMsg.length + 1);
         stack.storeRawBytes(errMsgOffset, StringToUint8Array(errMsg));
         stack.commitToWasmMemory();
-        (this.lib.exports.FTVMFFIErrorSetRaisedFromCStr as 
ctypes.FTVMFFIErrorSetRaisedFromCStr)(
+        (this.lib.exports.TVMFFIErrorSetRaisedFromCStr as 
ctypes.FTVMFFIErrorSetRaisedFromCStr)(
           stack.ptrFromOffset(errKindOffset),
           stack.ptrFromOffset(errMsgOffset)
         );

Reply via email to