mirror of
https://github.com/goodpuppies/petplay.git
synced 2026-10-23 11:00:51 +02:00
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
7 lines
223 B
TypeScript
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`);
|
|
}
|