mirror of
https://github.com/BigBodyCobain/Shadowbroker.git
synced 2026-06-12 17:17:50 +02:00
release: prepare v0.9.7
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
const { execFileSync } = require('node:child_process');
|
||||
const path = require('node:path');
|
||||
const fs = require('node:fs');
|
||||
|
||||
const frontendDir = path.resolve(__dirname, '..');
|
||||
const repoRoot = path.resolve(frontendDir, '..');
|
||||
const privacyCoreManifest = path.join(repoRoot, 'privacy-core', 'Cargo.toml');
|
||||
const outDir = path.join(frontendDir, 'src', 'mesh', 'privacyCoreWasm');
|
||||
const wasmPath = path.join(
|
||||
repoRoot,
|
||||
'privacy-core',
|
||||
'target',
|
||||
'wasm32-unknown-unknown',
|
||||
'release',
|
||||
'privacy_core.wasm',
|
||||
);
|
||||
|
||||
function run(bin, args) {
|
||||
execFileSync(bin, args, {
|
||||
cwd: repoRoot,
|
||||
stdio: 'inherit',
|
||||
});
|
||||
}
|
||||
|
||||
fs.mkdirSync(outDir, { recursive: true });
|
||||
|
||||
run('rustup', ['target', 'add', 'wasm32-unknown-unknown']);
|
||||
run('cargo', ['build', '--target', 'wasm32-unknown-unknown', '--release', '--manifest-path', privacyCoreManifest]);
|
||||
run('wasm-bindgen', ['--target', 'web', '--out-dir', outDir, wasmPath]);
|
||||
Reference in New Issue
Block a user