Skip to content

Commit 258438d

Browse files
committed
update
1 parent 0269588 commit 258438d

22 files changed

Lines changed: 845 additions & 4888 deletions

‎Cargo.lock‎

Lines changed: 43 additions & 51 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎Makefile‎

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33

44
TS_ROOT = ts/
55
TS_SRC = $(TS_ROOT)src/
6+
TS_LIB = $(TS_ROOT)lib/
67
TS_DIST = $(TS_ROOT)dist/
78
TS_MAIN = $(TS_DIST)main.js
89
RS_SRC = rs/
@@ -17,19 +18,18 @@ clean:
1718

1819
update:
1920
cargo update
20-
(cd $(TS_ROOT); npm update)
21+
(cd $(TS_ROOT); pnpm update)
2122

2223
debug:
2324
(cd $(RS_SRC); cargo build)
24-
cp target/wasm32-unknown-unknown/debug/libentropy.wasm $(RS_LIB)
25+
cp target/wasm32-unknown-unknown/debug/libimage.wasm $(RS_LIB)
2526

2627
$(RS_LIB): $(RS_SRC)src/*.rs
27-
echo "export const HASH = \"`git rev-parse --short HEAD`\";" > $(TS_ROOT)src/hash.ts
28-
(cd $(RS_SRC); cargo build --release)
29-
wasm-bindgen target/wasm32-unknown-unknown/release/libentropy.wasm --out-dir $(TS_ROOT)lib
28+
(cd $(RS_SRC); wasm-pack build --target web --out-dir ../$(TS_LIB))
3029

3130
$(TS_MAIN): $(RS_LIB) $(TS_SRC)*.ts
32-
(cd $(TS_ROOT); npm i; npm run build)
31+
echo "export const HASH = \"`git rev-parse --short HEAD`\";" > $(TS_ROOT)src/hash.ts
32+
(cd $(TS_ROOT); pnpm i; pnpm run build)
3333

3434
server:
35-
(cd $(TS_ROOT); npm run start)
35+
(cd $(TS_ROOT); pnpm dev)

‎README.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
- You can experiment with encoding your input text in <a href="https://en.wikipedia.org/wiki/Canonical_Huffman_code" target="_blank">Canonical Huffman code</a>.
99
- The data you enter will not be transmitted over the network.
10-
- Output formats are subject to change without notice.
10+
- Since this tool is not intended for practical use, the output format may change without notice.
1111

1212
## License
1313

‎mise.toml‎

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
[tasks.server]
2+
description = "Run a server"
3+
run = "make server"
4+
5+
[tasks.build]
6+
description = "Build"
7+
run = "make"
8+
9+
[tasks.update]
10+
confirm = "Are you ok?"
11+
description = "Update dependencies"
12+
run = "make update"
13+
14+
[tasks.clean]
15+
confirm = "Are you ok?"
16+
description = "Clean up"
17+
run = "make clean"

‎package-lock.json‎

Lines changed: 0 additions & 6 deletions
This file was deleted.

0 commit comments

Comments
 (0)