Skip to content

[FEAT] Integrate WASM-Compiled Tree-Sitter Parsers for Multi-Language Support #599

Description

@mijinummi

Labels: medium-difficulty, wasm, parsers
Difficulty: Medium
Module: libs/parsers/


🧠 Concept

Integrate Tree-Sitter WebAssembly bindings for Solidity, Rust, and Vyper to standardize AST node representations across all target languages.

⚠️ Problem

Relying on disparate language-specific compilers for parsing introduces heavy local dependency chains and inconsistent AST interfaces.

📁 Implementation Scope

  • libs/parsers/src/tree-sitter-loader.ts
  • libs/parsers/src/solidity-parser.ts
  • libs/parsers/src/rust-parser.ts

🛠️ Requirements

  1. Load compiled Tree-Sitter .wasm grammars dynamically.
  2. Export unified AST traversal interfaces (findNodes(), getParent(), getNodeText()).
  3. Ensure parsing operates asynchronously without blocking the event loop.

🎯 Acceptance Criteria

  • Parses Solidity and Rust source code into standard Tree-Sitter syntax trees.
  • Operates across browser and Node.js environments.

Metadata

Metadata

Assignees

Labels

Stellar WaveIssues in the Stellar wave program

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions