(feat): redesign WASM module, add TypeScript SDK, migrate to pnpm
Some checks failed
CI / rustfmt (push) Successful in 17s
CI / wasm build (push) Successful in 1m16s
CI / clippy (push) Successful in 1m28s
CI / test (push) Successful in 1m48s
CI / example (push) Successful in 1m31s
CI / duplicate code (push) Failing after 33s
CI / web client (push) Failing after 34s
CI / cargo-machete (push) Successful in 1m18s
CI / cargo-deny (push) Failing after 3m2s

This commit is contained in:
Alois 2026-06-27 23:44:27 +02:00
commit 5caa1c9d5f
49 changed files with 3717 additions and 1501 deletions

View file

@ -44,17 +44,7 @@ jobs:
run: |
export PATH="$HOME/.cargo/bin:$PATH"
export MTP_TYPE_MAPS="$PWD/example/type-maps.yaml"
cargo clippy --workspace --exclude mtp-wasm --all-targets --all-features -- -D warnings \
-W unreachable-pub \
-W clippy::cognitive_complexity \
-W clippy::missing_docs_in_private_items \
-W clippy::missing_errors_doc \
-W clippy::missing_panics_doc \
-W clippy::missing_safety_doc \
-W clippy::undocumented_unsafe_blocks \
-W clippy::pedantic \
-W clippy::restriction \
-A clippy::blanket_clippy_restriction_lints
cargo clippy --workspace --exclude mtp-wasm --all-targets --all-features -- -D warnings -W unreachable-pub
test:
name: test
@ -169,21 +159,21 @@ jobs:
- uses: https://data.forgejo.org/actions/checkout@v4
- name: Install system dependencies
run: apt-get update && apt-get install -y --no-install-recommends ca-certificates curl unzip
run: apt-get update && apt-get install -y --no-install-recommends ca-certificates curl unzip nodejs
- name: Install Bun
- name: Install pnpm
run: |
curl -fsSL https://bun.sh/install | bash
curl -fsSL https://get.pnpm.io/install.sh | SHELL=/bin/sh sh -
- name: Install dependencies
run: |
export PATH="$HOME/.bun/bin:$PATH"
bun install --frozen-lockfile
export PATH="$HOME/.local/share/pnpm:$PATH"
pnpm install --frozen-lockfile
- name: Run duplicate detector
run: |
export PATH="$HOME/.bun/bin:$PATH"
bun run dup
export PATH="$HOME/.local/share/pnpm:$PATH"
pnpm run dup
web-client:
name: web client
@ -192,7 +182,7 @@ jobs:
- uses: https://data.forgejo.org/actions/checkout@v4
- name: Install system dependencies
run: apt-get update && apt-get install -y --no-install-recommends ca-certificates curl unzip build-essential pkg-config libssl-dev lld
run: apt-get update && apt-get install -y --no-install-recommends ca-certificates curl unzip nodejs build-essential pkg-config libssl-dev lld
- name: Install Rust
run: |
@ -209,18 +199,24 @@ jobs:
env:
RUSTFLAGS: --cfg web_sys_unstable_apis
- name: Install Bun
- name: Install pnpm
run: |
curl -fsSL https://bun.sh/install | bash
curl -fsSL https://get.pnpm.io/install.sh | SHELL=/bin/sh sh -
- name: Install dependencies
working-directory: example/web-client
run: |
export PATH="$HOME/.bun/bin:$PATH"
bun install --frozen-lockfile
export PATH="$HOME/.local/share/pnpm:$PATH"
pnpm install --frozen-lockfile
- name: Build TypeScript package
run: |
export PATH="$HOME/.cargo/bin:$HOME/.local/share/pnpm:$PATH"
export MTP_TYPE_MAPS="$PWD/example/type-maps.yaml"
pnpm run build
env:
RUSTFLAGS: --cfg web_sys_unstable_apis
- name: Build web client
working-directory: example/web-client
run: |
export PATH="$HOME/.bun/bin:$PATH"
bun run build
export PATH="$HOME/.local/share/pnpm:$PATH"
pnpm --filter mtp-web-client run build