Weftmap
Documentation

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.