perf(web-client): enable WASM SIMD instructions (#703)

This commit is contained in:
Benoît Cortier 2025-03-13 13:48:03 +01:00 committed by GitHub
parent 97f4f25813
commit 43f05a712d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 7 additions and 1 deletions

View file

@ -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}`);

View file

@ -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")?;
}