Skip to content

Commit

Permalink
Unlink missing-symbols.c after compilation
Browse files Browse the repository at this point in the history
  • Loading branch information
tniessen committed Nov 2, 2024
1 parent 1446af5 commit 839c042
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion scripts/build-wasm.mjs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { spawn } from 'node:child_process';
import * as events from 'node:events';
import { mkdir, readdir, readFile, stat, writeFile } from 'node:fs/promises';
import { mkdir, readdir, readFile, stat, unlink, writeFile } from 'node:fs/promises';

const buildDir = 'wasm/gen';
const depDir = 'deps/PQClean';
Expand Down Expand Up @@ -127,5 +127,7 @@ if (code !== 0) {
throw new Error(`emcc exited with ${code !== null ? `code ${code}` : `signal ${signal}`}`);
}

await unlink(`${buildDir}/missing-symbols.c`);

const { size } = await stat(`${buildDir}/pqclean.wasm`);
console.log(`WebAssembly module size is ${(size / 1024).toFixed(1)} KiB`);

0 comments on commit 839c042

Please sign in to comment.