Weftmap
التوثيق

Languages

Weftmap supports six languages today. The architecture is extensible: each language is a tree-sitter grammar plus a set of queries. Five produce a call graph; SQL produces an entity-relationship diagram.

LanguageFunctionsClassesImportsInheritance
Python
JavaScript
TypeScript
Go
Rust

Per-language notes

  • Python — functions, classes and methods; resolves import and from … import (including relative) and class inheritance.
  • JavaScript — functions (including assigned arrow functions), classes and methods; relative ES imports (./x) and extends.
  • TypeScript — same as JavaScript but with the dedicated grammar, so type annotations parse cleanly.
  • Go — functions and methods. Go has no classes, so there are no class nodes or inheritance.
  • Rust — functions and calls. Cross-file resolution uses unique definitions.
  • SQL — ER diagram from DDL (CREATE TABLE, ALTER TABLE): tables with columns and types, PK/FK keys, and foreign-key relationships with cardinality (1:1, 1:N, and N:M via junction tables). PostgreSQL-oriented.
In Go and Rust, imports are package- or module-based (not file-based), so import edges are not drawn. Calls between files in the same package are still resolved by name. SQL is a different diagram type: instead of functions and calls, it draws tables and relationships.