t8Array(memory.buffer);
                const startOffset = 1024; // Use a safe offset
                memoryArray.set(bytes, startOffset);
                return startOffset;
            }
            new Uint8Array(memory.buffer, ptr, bytes.length).set(bytes);
            return ptr;
        }
        
        function wasmPtrToString(ptr) {
            if (ptr === 0) return null;
            
            const memoryArray = new Uint8Array(memory.buffer);
            let length = 0;
            
         