The Phase-0 CI was red on all three runtimes: `src/embeddings/wasm/pkg/` (the
wasm-pack output the dynamic `import('./pkg/candle_embeddings.js')` resolves) was
gitignored + untracked, so tsc failed to resolve it on a fresh clone (TS2307), and
the Bun job ran test:bun without building dist first.
Fixes:
- Track the 3.1 MB prebuilt pkg (candle_embeddings.js/.d.ts + _bg.wasm/.d.ts). It
ships in the npm tarball anyway; versioning it lets consumers + CI build without
a Rust/wasm-pack toolchain and makes the shipped artifact reproducible (closes
the "publish ships whatever the maintainer last built" supply-chain gap). The
top-level .gitignore intended this (`!*.wasm` etc.) but excluded the whole dir,
so the re-includes were dead, and a nested wasm-pack `.gitignore *` also masked
it — force-added past both.
- CI Bun job: `npm run build` before `test:bun` (it imports the built dist/).
Verified against a tracked-files-only tree (fresh-clone sim): typecheck 0, build 0,
test:bun 8/8.
19 lines
1.2 KiB
TypeScript
19 lines
1.2 KiB
TypeScript
/* tslint:disable */
|
|
/* eslint-disable */
|
|
export const memory: WebAssembly.Memory;
|
|
export const __wbg_embeddingengine_free: (a: number, b: number) => void;
|
|
export const cosine_similarity: (a: number, b: number, c: number, d: number) => number;
|
|
export const embeddingengine_dimension: (a: number) => number;
|
|
export const embeddingengine_embed: (a: number, b: number, c: number) => [number, number, number];
|
|
export const embeddingengine_embed_batch: (a: number, b: any) => [number, number, number];
|
|
export const embeddingengine_is_ready: (a: number) => number;
|
|
export const embeddingengine_load: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => [number, number];
|
|
export const embeddingengine_max_sequence_length: (a: number) => number;
|
|
export const embeddingengine_new: () => number;
|
|
export const __wbindgen_malloc: (a: number, b: number) => number;
|
|
export const __wbindgen_realloc: (a: number, b: number, c: number, d: number) => number;
|
|
export const __wbindgen_exn_store: (a: number) => void;
|
|
export const __externref_table_alloc: () => number;
|
|
export const __wbindgen_externrefs: WebAssembly.Table;
|
|
export const __externref_table_dealloc: (a: number) => void;
|
|
export const __wbindgen_start: () => void;
|