Download unified-engine/kernel/compiler/compile.js from Snapkitty/repoverse: direct link, hf CLI and curl.
- Browser
- Download file 365 Bytes
-
https://huggingface.co/Snapkitty/repoverse/resolve/main/unified-engine/kernel/compiler/compile.js
- Command line
-
hf download hf://Snapkitty/repoverse/unified-engine/kernel/compiler/compile.js
-
curl -L -o compile.js https://huggingface.co/Snapkitty/repoverse/resolve/main/unified-engine/kernel/compiler/compile.js
365 Bytes
| /** | |
| * The full kernel pipeline: source -> AST -> IR -> wasm bytes. | |
| */ | |
| import { parse } from './parser.js'; | |
| import { lower } from '../ir/lowering.js'; | |
| import { emitModule } from '../../wasm/modules/codegen.js'; | |
| export function compile(source) { | |
| const ast = parse(source); | |
| const ir = lower(ast); | |
| const bytes = emitModule(ir); | |
| return { ast, ir, bytes }; | |
| } | |