Files
mommysgoodpuppy 0b70d41beb Encode native strings without importing an obsolete GLFW loader
The old DWM FFI module fetches unavailable GLFW binaries for every platform
even when imported only for cstr. Use a local UTF-8 encoder so source smoke
tests and compiled executables boot from clean caches.

Agent: Codex 0.163.0; model gpt-6.1-sol; thread 01a145fa-213b-7510-83c0-48dd3e275c9a
2026-10-16 22:52:25 +03:00

7 lines
223 B
TypeScript

const encoder = new TextEncoder();
/** Encode a null-terminated UTF-8 string for native calls without loading a native library. */
export function cstr(value: string): Uint8Array {
return encoder.encode(`${value}\0`);
}