Compare commits

...

3 Commits

Author SHA1 Message Date
Surma
26e9a848dd Run wasm-opt on hqx module 2019-06-19 00:27:13 +01:00
Surma
fbaa282f07 Update dependency ts-loader to v6.0.3 (#627)
Update dependency ts-loader to v6.0.3
2019-06-18 12:56:24 +01:00
renovate[bot]
6136ae7411 Update dependency ts-loader to v6.0.3 2019-06-18 11:30:57 +00:00
6 changed files with 53 additions and 16 deletions

View File

@@ -14,5 +14,10 @@ RUN rustup install nightly && \
cargo install wasm-pack
COPY --from=0 /opt/wabt /opt/wabt
ENV PATH="/opt/wabt/bin:${PATH}"
RUN mkdir /opt/binaryen && \
curl -L https://github.com/WebAssembly/binaryen/releases/download/1.38.32/binaryen-1.38.32-x86-linux.tar.gz | tar -xzf - -C /opt/binaryen --strip 1
ENV PATH="/opt/binaryen:/opt/wabt/bin:${PATH}"
WORKDIR /src

View File

@@ -8,6 +8,8 @@ echo "============================================="
(
rustup run nightly \
wasm-pack build --target no-modules
mv pkg/squooshhqx_bg.wasm pkg/squooshhqx_bg.unopt.wasm
wasm-opt -Os --no-validation pkg/squooshhqx_bg.unopt.wasm -o pkg/squooshhqx_bg.wasm
wasm-strip pkg/squooshhqx_bg.wasm
rm pkg/.gitignore
)

View File

@@ -0,0 +1,11 @@
// THIS IS NOT A NODE SCRIPT
// This is a d8 script. Please install jsvu[1] and install v8.
// Then run `npm run --silent benchmark`.
// [1]: https://github.com/GoogleChromeLabs/jsvu
async function init() {
const start = Date.now();
const module = await WebAssembly.compile(readbuffer("pkg/squooshhqx_bg.wasm"));
print(`${Date.now()/1000 - start/1000}`);
}
init().catch(e => console.error(e.stack));

Binary file not shown.

47
package-lock.json generated
View File

@@ -5465,7 +5465,8 @@
"ansi-regex": {
"version": "2.1.1",
"bundled": true,
"dev": true
"dev": true,
"optional": true
},
"aproba": {
"version": "1.2.0",
@@ -5486,12 +5487,14 @@
"balanced-match": {
"version": "1.0.0",
"bundled": true,
"dev": true
"dev": true,
"optional": true
},
"brace-expansion": {
"version": "1.1.11",
"bundled": true,
"dev": true,
"optional": true,
"requires": {
"balanced-match": "^1.0.0",
"concat-map": "0.0.1"
@@ -5506,17 +5509,20 @@
"code-point-at": {
"version": "1.1.0",
"bundled": true,
"dev": true
"dev": true,
"optional": true
},
"concat-map": {
"version": "0.0.1",
"bundled": true,
"dev": true
"dev": true,
"optional": true
},
"console-control-strings": {
"version": "1.1.0",
"bundled": true,
"dev": true
"dev": true,
"optional": true
},
"core-util-is": {
"version": "1.0.2",
@@ -5633,7 +5639,8 @@
"inherits": {
"version": "2.0.3",
"bundled": true,
"dev": true
"dev": true,
"optional": true
},
"ini": {
"version": "1.3.5",
@@ -5645,6 +5652,7 @@
"version": "1.0.0",
"bundled": true,
"dev": true,
"optional": true,
"requires": {
"number-is-nan": "^1.0.0"
}
@@ -5659,6 +5667,7 @@
"version": "3.0.4",
"bundled": true,
"dev": true,
"optional": true,
"requires": {
"brace-expansion": "^1.1.7"
}
@@ -5666,12 +5675,14 @@
"minimist": {
"version": "0.0.8",
"bundled": true,
"dev": true
"dev": true,
"optional": true
},
"minipass": {
"version": "2.3.5",
"bundled": true,
"dev": true,
"optional": true,
"requires": {
"safe-buffer": "^5.1.2",
"yallist": "^3.0.0"
@@ -5690,6 +5701,7 @@
"version": "0.5.1",
"bundled": true,
"dev": true,
"optional": true,
"requires": {
"minimist": "0.0.8"
}
@@ -5770,7 +5782,8 @@
"number-is-nan": {
"version": "1.0.1",
"bundled": true,
"dev": true
"dev": true,
"optional": true
},
"object-assign": {
"version": "4.1.1",
@@ -5782,6 +5795,7 @@
"version": "1.4.0",
"bundled": true,
"dev": true,
"optional": true,
"requires": {
"wrappy": "1"
}
@@ -5867,7 +5881,8 @@
"safe-buffer": {
"version": "5.1.2",
"bundled": true,
"dev": true
"dev": true,
"optional": true
},
"safer-buffer": {
"version": "2.1.2",
@@ -5903,6 +5918,7 @@
"version": "1.0.2",
"bundled": true,
"dev": true,
"optional": true,
"requires": {
"code-point-at": "^1.0.0",
"is-fullwidth-code-point": "^1.0.0",
@@ -5922,6 +5938,7 @@
"version": "3.0.1",
"bundled": true,
"dev": true,
"optional": true,
"requires": {
"ansi-regex": "^2.0.0"
}
@@ -5965,12 +5982,14 @@
"wrappy": {
"version": "1.0.2",
"bundled": true,
"dev": true
"dev": true,
"optional": true
},
"yallist": {
"version": "3.0.3",
"bundled": true,
"dev": true
"dev": true,
"optional": true
}
}
},
@@ -14164,9 +14183,9 @@
"dev": true
},
"ts-loader": {
"version": "6.0.2",
"resolved": "https://registry.npmjs.org/ts-loader/-/ts-loader-6.0.2.tgz",
"integrity": "sha512-kkF3sGf3oBUehlvXI9fkbItbFTnNgGkYAz91vtWnsKAU4m+LAmQjuby7uTZNo3As+/zHLuyB052SkQDY6vLXtg==",
"version": "6.0.3",
"resolved": "https://registry.npmjs.org/ts-loader/-/ts-loader-6.0.3.tgz",
"integrity": "sha512-iICBD4PryhnGNdtaDva49UGODHFVcuK7p4+G8CP1TVcUhTC4hkcy4MC2dzWwALSnpOzfUfA/4u8B2F64wsMgjQ==",
"dev": true,
"requires": {
"chalk": "^2.3.0",

View File

@@ -59,7 +59,7 @@
"style-loader": "0.23.1",
"terser-webpack-plugin": "1.3.0",
"travis-size-report": "1.0.1",
"ts-loader": "6.0.2",
"ts-loader": "6.0.3",
"tslint": "5.17.0",
"tslint-config-airbnb": "5.11.1",
"tslint-config-semistandard": "8.0.1",