Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions .claude/rules/xtask.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,10 @@ paths:

## Dev tool version pinning

Dev tools whose versions must match Cargo.lock (e.g., `wasm-bindgen-cli`) are installed
via `cargo xtask dev-setup`, which reads the locked version automatically. Never hardcode
these versions in CI workflows or documentation — always use `cargo xtask dev-setup`.
Dev tools whose versions must match Cargo.lock (e.g., `wasm-bindgen-cli`) are pinned in
`crates/xtask/src/dev_setup.rs`. When updating `wasm-bindgen` in Cargo.lock, also update
the pinned version in `dev_setup.rs` to match. CI workflows extract the version directly
from `crates/wasm-quarto-hub-client/Cargo.lock` to avoid duplication.

## Adding a new subcommand

Expand Down
58 changes: 0 additions & 58 deletions .github/workflows/build-wasm.yml

This file was deleted.

24 changes: 16 additions & 8 deletions .github/workflows/hub-client-e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,9 @@ jobs:
[ "$time" != "@0" ] && touch -d "$time" "$file" 2>/dev/null || true
done

# Rust toolchain for WASM build
- name: Set up Rust nightly
uses: dtolnay/rust-toolchain@nightly
with:
targets: wasm32-unknown-unknown
# Install toolchain from rust-toolchain.toml (nightly + components + targets)
- name: Set up Rust
run: rustup show active-toolchain

- name: Set up Clang
uses: egor-tensin/setup-clang@v2
Expand All @@ -48,9 +46,6 @@ jobs:
with:
cache-on-failure: true

- name: Install wasm-pack
run: cargo install wasm-pack

# tree-sitter for grammar builds
- name: Set up tree-sitter CLI
run: |
Expand All @@ -72,6 +67,19 @@ jobs:
- name: Build TypeScript packages
run: npm run build

# wasm-bindgen-cli must match the wasm-bindgen version in Cargo.lock
# Use pre-built binary via taiki-e/install-action (faster, avoids transitive dep issues)
- name: Detect wasm-bindgen version
id: wb-version
run: |
VERSION=$(grep -A1 'name = "wasm-bindgen"' crates/wasm-quarto-hub-client/Cargo.lock | grep version | head -1 | sed 's/.*"\(.*\)"/\1/')
echo "version=$VERSION" >> "$GITHUB_OUTPUT"

- name: Install wasm-bindgen-cli
uses: taiki-e/install-action@v2
with:
tool: wasm-bindgen-cli@${{ steps.wb-version.outputs.version }}

# Build WASM module
- name: Build WASM
run: |
Expand Down
10 changes: 3 additions & 7 deletions .github/workflows/test-suite.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,13 +46,9 @@ jobs:
id: set-up-homebrew
uses: Homebrew/actions/setup-homebrew@main

# Consistent Rust setup for both platforms
- name: Set up Rust nightly
uses: dtolnay/rust-toolchain@nightly

- name: Output rust version
shell: bash
run: rustup --version
# Install toolchain from rust-toolchain.toml (nightly + components + targets)
- name: Set up Rust
run: rustup show active-toolchain

# Cache Rust AFTER toolchain is set up
- name: Cache Rust dependencies
Expand Down
24 changes: 15 additions & 9 deletions .github/workflows/ts-test-suite.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,13 +46,9 @@ jobs:
id: set-up-homebrew
uses: Homebrew/actions/setup-homebrew@main

# Consistent Rust setup for both platforms
- name: Set up Rust nightly
uses: dtolnay/rust-toolchain@nightly

- name: Output rust version
shell: bash
run: rustup --version
# Install toolchain from rust-toolchain.toml (nightly + components + targets)
- name: Set up Rust
run: rustup show active-toolchain

# # Cache Rust AFTER toolchain is set up
# - name: Cache Rust dependencies
Expand Down Expand Up @@ -123,9 +119,19 @@ jobs:
run: brew install llvm
shell: bash

- name: Install wasm-bindgen-cli
# wasm-bindgen-cli must match the wasm-bindgen version in Cargo.lock
# Use pre-built binary via taiki-e/install-action (faster, avoids transitive dep issues)
- name: Detect wasm-bindgen version
id: wb-version
shell: bash
run: cargo install wasm-bindgen-cli --version 0.2.108
run: |
VERSION=$(grep -A1 'name = "wasm-bindgen"' crates/wasm-quarto-hub-client/Cargo.lock | grep version | head -1 | sed 's/.*"\(.*\)"/\1/')
echo "version=$VERSION" >> "$GITHUB_OUTPUT"

- name: Install wasm-bindgen-cli
uses: taiki-e/install-action@v2
with:
tool: wasm-bindgen-cli@${{ steps.wb-version.outputs.version }}

- name: Build WASM module
shell: bash
Expand Down
8 changes: 5 additions & 3 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -271,11 +271,12 @@ When fixing ANY bug:
- `quarto-treesitter-ast`: generic tree-sitter AST traversal utilities

**WASM:**
- `wasm-qmd-parser`: WASM module with entry points from `pampa` (see [crates/wasm-qmd-parser/CLAUDE.md](crates/wasm-qmd-parser/CLAUDE.md) for build instructions)
- `wasm-quarto-hub-client`: WASM client for hub-client (see [crates/wasm-quarto-hub-client/README.md](crates/wasm-quarto-hub-client/README.md) for build instructions)
- `wasm-qmd-parser`: lightweight parsing-only WASM wrapper around `pampa` (dormant — kept for future use)

### `hub-client/` - Quarto Hub web client

A React/TypeScript web application for collaborative editing of Quarto projects. Uses Automerge for real-time sync and the WASM build of `wasm-qmd-parser` for live preview rendering.
A React/TypeScript web application for collaborative editing of Quarto projects. Uses Automerge for real-time sync and the WASM build of `wasm-quarto-hub-client` for live preview rendering.

**Key directories:**
- `src/components/` - React components (Editor, FileSidebar, tabs, etc.)
Expand Down Expand Up @@ -309,7 +310,8 @@ All VFS file paths use the `/project/` prefix. When resolving file paths in WASM

- `pampa` is the core Quarto engine crate
- `quarto-core` handles higher-level orchestration
- `wasm-quarto-hub-client` is the WASM client (NOT wasm-qmd-parser)
- `wasm-quarto-hub-client` is the active WASM client for hub-client
- `wasm-qmd-parser` is dormant — a lightweight parsing-only WASM wrapper kept for future use
- Always check `git diff` for uncommitted changes before starting work on a continuation session

## hub-client Commit Instructions
Expand Down
7 changes: 2 additions & 5 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ members = [
]
default-members = ["crates/*", "crates/experiments/reconcile-viewer"]
# Excluded crates require special build toolchains or targets:
# - WASM crates: build with wasm-pack or --target wasm32-unknown-unknown
# - WASM crates: require --target wasm32-unknown-unknown and -Zbuild-std (see dev-docs/wasm.md)
# - pampa/fuzz: requires nightly Rust + libfuzzer-sys (Linux/macOS only), run via `cargo fuzz`
# crates/experiments is a container directory, not a crate, so we exclude it from crates/* matching.
exclude = [
Expand Down Expand Up @@ -97,9 +97,6 @@ path = "./crates/tree-sitter-qmd"
[workspace.dependencies.tree-sitter-sexpr]
path = "./crates/tree-sitter-sexpr"

[workspace.dependencies.wasm-qmd-parser]
path = "./crates/wasm-qmd-parser"

[workspace.dependencies.pampa]
path = "./crates/pampa"
default-features = false
Expand Down Expand Up @@ -273,7 +270,7 @@ lua-src = { path = "crates/lua-src-wasm" }
# Profiles must be set at the workspace level
[profile.dev]
# Tell `rustc` to optimize for small code size to
# work around "too many locals" error from wasm-pack
# work around "too many locals" error in WASM builds
# https://github.com/wasm-bindgen/wasm-bindgen/issues/3451#issuecomment-1562982835
opt-level = "s"

Expand Down
11 changes: 0 additions & 11 deletions crates/wasm-qmd-parser/.appveyor.yml

This file was deleted.

2 changes: 0 additions & 2 deletions crates/wasm-qmd-parser/.cargo/config.toml

This file was deleted.

8 changes: 0 additions & 8 deletions crates/wasm-qmd-parser/.github/dependabot.yml

This file was deleted.

69 changes: 0 additions & 69 deletions crates/wasm-qmd-parser/.travis.yml

This file was deleted.

32 changes: 0 additions & 32 deletions crates/wasm-qmd-parser/CLAUDE.md

This file was deleted.

Loading
Loading