mtcute/packages/wasm
alina sireneva 46414e4e19
All checks were successful
Build and deploy docs / build (push) Successful in 1m27s
Tests / test-deno (push) Successful in 1m50s
Tests / test-bun (push) Successful in 1m59s
Tests / test-node (node22) (push) Successful in 2m12s
Tests / test-node (node20) (push) Successful in 2m16s
Tests / test-node (node18) (push) Successful in 2m18s
Tests / test-web (chromium) (push) Successful in 2m14s
Tests / test-web (firefox) (push) Successful in 2m25s
Build and deploy typedoc / build (push) Successful in 6m16s
Tests / lint (push) Successful in 6m55s
Tests / e2e-deno (push) Successful in 53s
Tests / e2e (push) Successful in 48s
fix(wasm): remove vite-ignore annotation from result
2025-01-19 20:15:23 +03:00
..
lib chore: put wasm blob to root of the package 2024-03-07 05:35:37 +03:00
src chore: moved build to @fuman/build 2024-11-16 16:26:23 +03:00
tests chore: bumped @antfu/eslint-config + reformat 2024-12-03 09:55:37 +03:00
.gitignore feat: wasm! 🚀 2023-11-04 06:44:18 +03:00
build.config.js fix(wasm): remove vite-ignore annotation from result 2025-01-19 20:15:23 +03:00
package.json chore(release): v0.19.0 2024-12-30 21:58:57 +00:00
README.md chore: migrate to antfu eslint config (+ reformat) 2024-08-18 07:18:13 +03:00
tsconfig.json build: build with vite (initial) 2024-08-24 22:55:25 +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