Skip to content

Conversation

@konard
Copy link
Member

@konard konard commented Sep 10, 2025

Summary

This PR implements issue #12 by adding a complete WebAssembly version of the link-cli tool using Rust, allowing users to execute link manipulation operations directly in web browsers.

🚀 Key Features

  • Full WebAssembly Implementation: Complete Rust-based port with wasm-bindgen for JavaScript interop
  • Browser-Native Execution: Runs entirely client-side without server dependencies
  • Multiple Build Targets: Web browsers, Node.js, and bundlers (Webpack, Rollup, etc.)
  • Interactive Web Demo: Live demonstration with pre-built examples at /www/index.html
  • Comprehensive Testing: Automated CI/CD pipeline with browser and Node.js testing

🔗 LiNo Protocol Support

The implementation includes a robust LiNo parser supporting all core operations:

  • Create: () ((1 1)) - Create new links
  • Read: ((($i: $s $t)) (($i: $s $t))) - Query existing links
  • Update: ((1: 1 1)) ((1: 1 2)) - Modify existing links
  • Delete: ((1 1)) () - Remove links
  • Wildcards: ((* *)) () - Delete all links

📦 Distribution

  • NPM Package: Available as clink-wasm for Node.js usage
  • Web Package: Direct browser import via ES modules
  • GitHub Pages: Automated demo deployment

🧪 Testing & Quality

  • Rust unit tests for core functionality
  • WebAssembly integration tests in browsers
  • Automated builds for all target platforms
  • Compatibility testing with Protocols.Lino specification

📋 API Usage

import init, { Clink } from 'clink-wasm';

await init();
const clink = new Clink();

const options = JSON.stringify({
    db: "memory",
    changes: true,
    after: true
});

const result = clink.execute("() ((1 1))", options);
console.log(JSON.parse(result).output);

🔄 Version Update

Project version updated to 2.3.0 across:

  • C# project (Foundation.Data.Doublets.Cli.csproj)
  • Rust/WASM project (Cargo.toml)
  • NPM package (package.json)

Test Plan

  • Rust unit tests pass (cargo test)
  • WebAssembly builds successfully for all targets
  • Browser demo works with all example operations
  • Node.js integration functions correctly
  • CI/CD pipeline builds and tests automatically
  • Version consistency across all package files
  • Documentation complete and accurate

🤖 Generated with Claude Code


Resolves #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 <[email protected]>
@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
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

2 participants