mirror of
https://github.com/Devolutions/IronRDP.git
synced 2025-08-04 15:18:17 +00:00
27 lines
762 B
JavaScript
27 lines
762 B
JavaScript
import { spawn } from 'child_process';
|
|
|
|
let run = async function (command, cwd) {
|
|
return new Promise((resolve) => {
|
|
const buildCommand = spawn(command, {
|
|
stdio: 'pipe',
|
|
shell: true,
|
|
cwd: cwd,
|
|
env: { ...process.env, RUSTFLAGS: '-Ctarget-feature=+simd128' },
|
|
});
|
|
|
|
buildCommand.stdout.on('data', (data) => {
|
|
console.log(`${data}`);
|
|
});
|
|
|
|
buildCommand.stderr.on('data', (data) => {
|
|
console.error(`${data}`);
|
|
});
|
|
|
|
buildCommand.on('close', (code) => {
|
|
console.log(`child process exited with code ${code}`);
|
|
resolve();
|
|
});
|
|
});
|
|
};
|
|
|
|
await run('wasm-pack build --target web', '../../crates/ironrdp-web');
|