mtcute/packages/wasm
2024-06-02 14:28:27 +00:00
..
lib chore: put wasm blob to root of the package 2024-03-07 05:35:37 +03:00
src fix: only-if-esm for getWasmUrl 2024-03-07 05:35:37 +03:00
tests test(unit): running unit tests under deno 2024-04-27 12:19:05 +03:00
.gitignore feat: wasm! 🚀 2023-11-04 06:44:18 +03:00
build.config.cjs test: initial e2e publishing testing for deno 2024-04-23 13:44:11 +03:00
mtcute.wasm chore: put wasm blob to root of the package 2024-03-07 05:35:37 +03:00
package.json v0.13.0 2024-06-02 14:28:27 +00:00
README.md feat(wasm): added sha1/256 to wasm, removed most of async in crypto 2023-11-08 00:53:15 +03:00
tsconfig.json feat: wasm! 🚀 2023-11-04 06:44:18 +03:00
typedoc.cjs chore: moved most configs to .config 2023-11-13 13:28:11 +03:00

@mtcute/wasm

📖 API Reference

Highly optimized for size & speed WASM implementation of common algorithms used in Telegram.

Features

  • Super lightweight: Only 47 KB raw, 24 KB gzipped
  • Blazingly fast: Up to 10x faster than pure JS implementations
  • Ready to use: Implements almost all algos used in MTProto:
    • AES IGE
    • Deflate (zlib compression + gunzip)
    • SHA-1, SHA-256

Acknowledgements

  • Deflate is implemented through a modified version of libdeflate, MIT license.
    • Modified by kamillaova to support WASM and improve bundle size
  • AES IGE code is mostly based on tgcrypto, LGPL-3.0 license.
    • To comply with LGPL-3.0, the source code of the modified tgcrypto is available here under LGPL-3.0 license.
  • SHA1 is based on teeny-sha1
  • SHA256 is based on lekkit/sha256

Benchmarks

See https://github.com/mtcute/benchmarks