Skip to content

Build Rust WebAssembly browser workbench#52

Merged
konard merged 5 commits intomainfrom
issue-12-fc4292e4
May 2, 2026
Merged

Build Rust WebAssembly browser workbench#52
konard merged 5 commits intomainfrom
issue-12-fc4292e4

Conversation

@konard
Copy link
Copy Markdown
Member

@konard konard commented Sep 10, 2025

Summary

  • Replaced the old partial WASM query implementation with a wasm-bindgen wrapper around the Rust link-cli QueryProcessor.
  • Added a React/Vite browser workbench that runs Rust WASM in the browser and mirrors query snapshots into doublets-web@0.1.2 UnitedLinks storage.
  • Updated WebAssembly CI to build/test the Rust core, WASM wrapper, React app, and GitHub Pages artifact.
  • Added docs, issue-12 case-study evidence, screenshots, and removed tracked generated target/ files.

Reproduce

  1. rustup target add wasm32-unknown-unknown
  2. cargo install wasm-pack --version 0.14.0 --locked
  3. npm install
  4. npm run dev
  5. Open the Vite URL and run () ((child: father mother)).

Verification

  • cargo test --manifest-path rust/Cargo.toml --all-features
  • cargo test --lib
  • cargo fmt --all -- --check
  • cargo clippy --all-targets --all-features -- -D warnings
  • cargo fmt --manifest-path rust/Cargo.toml --all -- --check
  • cargo clippy --manifest-path rust/Cargo.toml --all-targets --all-features -- -D warnings
  • npm run test:wasm
  • npm run build
  • npm run build:pages
  • npm audit --json
  • Playwright production preview at http://127.0.0.1:4173/: ran the sample query on desktop and mobile; console had zero errors/warnings.

Screenshots

Desktop:

Desktop WebAssembly workbench

Mobile:

Mobile WebAssembly workbench

CI Investigation Notes

The two old failed WebAssembly CI runs were from 2025-09-10 on SHA efe5e5984191ef2b4e1deb54ca083b363ef766ad. GitHub returned HTTP 410 when downloading those logs on 2026-05-01, so their exact log bodies are no longer available; this branch now contains the current workflow and fresh local verification above.

Fixes #12

Adding CLAUDE.md with task information for AI processing.
This file will be removed when the task is complete.

Issue: #12
@konard konard self-assigned this Sep 10, 2025
konard and others added 2 commits September 10, 2025 17:35
This addresses issue #12 by adding a complete WebAssembly implementation of the link-cli tool that can run directly in web browsers.

Key features:
- Full Rust/WebAssembly implementation with wasm-bindgen
- Comprehensive LiNo protocol parser compatible with Protocols.Lino
- In-memory links storage system
- Multiple build targets (web, Node.js, bundlers)
- Interactive web demo with live examples
- CI/CD pipeline for automated builds and testing
- NPM package distribution as clink-wasm

The implementation supports all core CRUD operations:
- Create: () ((1 1))
- Read: ((($i: $s $t)) (($i: $s $t)))
- Update: ((1: 1 1)) ((1: 1 2))
- Delete: ((1 1)) ()

Version bumped to 2.3.0 to reflect this major enhancement.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
@konard konard changed the title [WIP] Make WebAssembly version using Rust version of Doublets Implement WebAssembly version using Rust for browser execution Sep 10, 2025
@konard konard marked this pull request as ready for review September 10, 2025 14:49
@konard
Copy link
Copy Markdown
Member Author

konard commented Apr 30, 2026

Fresh changes from default branch should be taken.

That should be based on GitHub Pages and https://www.npmjs.com/package/doublets-web, we also need to make sure both link-cli in JavaScript and Rust are able to start web-server connected to links instance.

Depends on:

Reread the issue of #12

And fully support new latest version of https://www.npmjs.com/package/doublets-web.

We need fully function demo using WebAssembly + Rust + JavaScript + React.js inside a browser, and it should be published as single page website, while also tell a story about link-cli.

That would be web interface to links data storage, made using web assembly version of doublet-rs for maximum efficiency.

We need to collect data related about the issue to this repository, make sure we compile that data to ./docs/case-studies/issue-{id} folder, and use it to do deep case study analysis (also make sure to search online for additional facts and data), list of each and all requirements from the issue, and propose possible solutions and solution plans for each requirement (we should also check known existing components/libraries, that solve similar problem or can help in solutions).

Please plan and execute everything in a single pull request, you have unlimited time and context, as context autocompacts and you can continue indefinetely, do as much as possible in one go, until it is each and every requirement fully addressed, and everything is totally done.

@konard konard marked this pull request as draft May 1, 2026 11:10
@konard
Copy link
Copy Markdown
Member Author

konard commented May 1, 2026

🤖 AI Work Session Started

Starting automated work session at 2026-05-01T11:10:38.133Z

The PR has been converted to draft mode while work is in progress.

This comment marks the beginning of an AI work session. Please wait for the session to finish, and provide your feedback.

konard added 2 commits May 1, 2026 11:18
# Conflicts:
#	csharp/Foundation.Data.Doublets.Cli/Foundation.Data.Doublets.Cli.csproj
@konard konard changed the title Implement WebAssembly version using Rust for browser execution Build Rust WebAssembly browser workbench May 1, 2026
@konard konard marked this pull request as ready for review May 1, 2026 11:42
@konard
Copy link
Copy Markdown
Member Author

konard commented May 1, 2026

Working session summary

Implemented and pushed the fix to PR 52:

#52

What changed:

  • Replaced the stale partial WASM parser with a wasm-bindgen wrapper around the Rust link-cli QueryProcessor.
  • Added the React/Vite browser workbench using doublets-web@0.1.2.
  • Added GitHub Pages build/deploy workflow, docs, case-study evidence, and desktop/mobile screenshots.
  • Removed previously tracked generated target/ artifacts.

Verification:

  • Local Rust tests, fmt, clippy passed.
  • npm run test:wasm, npm run build, npm run build:pages, and npm audit passed.
  • Playwright production preview passed on desktop/mobile with zero console errors/warnings.
  • Fresh GitHub checks passed; PR merge state is CLEAN.
  • PR is marked ready for review.

This summary was automatically extracted from the AI working session output.

@konard
Copy link
Copy Markdown
Member Author

konard commented May 1, 2026

🤖 Solution Draft Log

This log file contains the complete execution trace of the AI solution draft process.

💰 Cost estimation:

  • Model: GPT-5.5
  • Provider: OpenAI
  • Public pricing estimate: $30.605340

📊 Context and tokens usage:

  • peak request: 24.3M / 1.1M (2319%) input tokens, 67.0K / 128K (52%) output tokens

Total: (360.4K + 24.0M cached) input tokens, 67.0K output tokens, $30.605340 cost

🤖 Models used:

  • Tool: OpenAI Codex
  • Requested: gpt-5.5
  • Model: GPT-5.5 (gpt-5.5)

📎 Log file uploaded as Repository (68894KB)


Now working session is ended, feel free to review and add any feedback on the solution draft.

@konard
Copy link
Copy Markdown
Member Author

konard commented May 1, 2026

✅ Ready to merge

This pull request is now ready to be merged:

  • All CI checks have passed
  • No merge conflicts
  • No pending changes

Monitored by hive-mind with --auto-restart-until-mergeable flag

@konard konard merged commit 33d6f07 into main May 2, 2026
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Make WebAssembly version using Rust version of Doublets

1 participant