mirror of
https://github.com/Devolutions/IronRDP.git
synced 2025-07-07 17:45:01 +00:00
perf(web-client): enable WASM SIMD instructions (#703)
This commit is contained in:
parent
97f4f25813
commit
43f05a712d
2 changed files with 7 additions and 1 deletions
|
@ -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")?;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue