mirror of
https://github.com/netbirdio/IronRDP.git
synced 2026-05-22 18:43:12 -07:00
perf(web-client): enable WASM SIMD instructions (#703)
This commit is contained in:
@@ -2,7 +2,12 @@ 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 });
|
||||
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}`);
|
||||
|
||||
@@ -47,6 +47,7 @@ fn build(sh: &Shell, wasm_pack_dev: bool) -> anyhow::Result<()> {
|
||||
if wasm_pack_dev {
|
||||
run_cmd_in!(sh, IRONRDP_WEB_PATH, "wasm-pack build --dev --target web")?;
|
||||
} else {
|
||||
let _env_guard = sh.push_env("RUSTFLAGS", "-Ctarget-feature=+simd128");
|
||||
run_cmd_in!(sh, IRONRDP_WEB_PATH, "wasm-pack build --target web")?;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user