import type { TreeNode, WorkspaceFile } from './ide-types.js'; export declare function isSourceFile(path: string): boolean; export declare function isTextFile(path: string): boolean; export declare function resolveWsPath(cwd: string, relOrAbs: string): string; export declare function fileName(path: string): string; export declare function inferLanguage(path: string): string; export declare function buildFileTree(paths: string[]): TreeNode[]; /** * Returns true if any text source file in the workspace includes SDL3 headers. * Used to select the SDL3 compile path over the standard WASI path. */ export declare function detectsSDL(files: Record): boolean; /** * Returns emcc args that use emscripten's built-in SDL3 port (-sUSE_SDL=3). * * Output is main.wasm (standalone/WASI mode). The linker's JS-generation step * (compiler.mjs) is not available in the Emception browser environment, so we * cannot use -o main.js. Instead, the WASI imports required by the standalone * binary are satisfied by makeWasiStubs() at runtime in Ide.tsx. */ export declare function buildSDL3ArgsPort(targetFsPath: string): string[]; /** * Build a wasi_snapshot_preview1 shim suitable for SDL3 canvas apps. * * Standalone WASM compiled with emcc -o main.wasm imports WASI symbols. * SDL3 canvas apps don't use the filesystem or args at runtime; they only need * basic clock/stdio stubs so the startup sequence doesn't abort. * * The `getMemory` callback lets the stubs lazily resolve the WASM linear memory * (available only after WebAssembly.instantiate returns). */ export declare function makeWasiStubs(getMemory: () => WebAssembly.Memory | null, writeLine: (s: string) => void): Record; //# sourceMappingURL=ide-utils.d.ts.map