Skip to content

Fix playground t-ruby-wasm integration issues #15

@yhk1038

Description

@yhk1038

Problem

The playground's t-ruby-wasm integration has issues that need to be addressed for a reliable user experience.

Current Architecture

The playground uses CDN-loaded WASM files:

  • T-Ruby library: @t-ruby/wasm@0.0.8 from jsdelivr
  • Ruby WASM runtime: @ruby/wasm-wasi@2.7.1
  • Ruby binary: @ruby/3.4-wasm-wasi@2.7.1

Issues to Fix

  1. Network failures - No retry logic for CDN fetch failures
  2. Timeout issues - 30-second compile timeout may be too tight
  3. Memory management - No cleanup of loaded files between compiles
  4. Error handling - Generic error messages need improvement
  5. Worker lifecycle - No cleanup on component unmount

Files Affected

  • src/lib/ruby-wasm.ts - WASM loader and worker management
  • src/pages/playground.tsx - React component

Acceptance Criteria

  • Playground loads reliably
  • Compilation works correctly
  • Error messages are user-friendly
  • Verification tests pass

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions