GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - winfunc/stackwalk: Universal language-agnostic AST walking and accurate call stack generation with tree-sitter.

BranchesTags
Open more actions menu

Latest commit

 

History

32 Commits
32 Commits

Folders and files

NameName
Last commit message
Last commit date
.assets
.assets
 
 
examples
examples
 
 
grammars
grammars
 
 
src
src
 
 
test-codebase
test-codebase
 
 
.gitignore
.gitignore
 
 
.gitmodules
.gitmodules
 
 
Cargo.toml
Cargo.toml
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
asterisk.toml
asterisk.toml
 
 
build.rs
build.rs
 
 
get_grammar.sh
get_grammar.sh
 
 

Repository files navigation

stackwalk logo

stackwalk 🌟

StackWalk is a library for parsing and indexing code in various languages. 📚

LICENSE

Table of Contents

  • Features
  • Installation
  • Usage
  • Configuration
  • Development
  • Contribution
  • License
  • Support The Author

Features

  • Extract code structure and call information 📊
  • Generate call graphs 🌐
  • Support for multiple languages 🌍
    • Rust 🦀
    • Python 🐍
  • Configurable language-specific settings 🛠️

Installation

Add stackwalk as a dependency in your Cargo.toml file:

[dependencies]
stackwalk = "0.1.0"

Usage

use stackwalk::config::Config;
use stackwalk::indexer::index_directory;

fn main() {
    let toml_str = fs::read_to_string("stackwalk.toml").expect("Unable to read file");
    let config = Config::from_toml(&toml_str).unwrap();

    let dir_path = "path/to/directory";
    let (blocks, call_stack, call_graph) = index_directory(&config, dir_path);

    // Process the extracted information
    // ...
}

Configuration

StackWalk uses a TOML configuration file to specify language-specific settings. Here's an example configuration:

[languages]
  [languages.python]
    [languages.python.matchers]
      import_statement = "import_from_statement"
      # ...

  [languages.rust]
    [languages.rust.matchers]
      import_statement = "use_declaration"  
      # ...

Development

To build the project from source:

$ git clone https://github.com/stitionai/stackwalk.git
$ cd stackwalk/
$ cargo build --release

Contribution

Ways to contribute:

  • Suggest a feature
  • Report a bug
  • Fix something and open a pull request
  • Help document the code
  • Spread the word

License

Licensed under the MIT License, see LICENSE for more information.

Liked the project?

Support the project by starring the repository. ⭐

About

Universal language-agnostic AST walking and accurate call stack generation with tree-sitter.

Resources

Readme
MIT license
Activity
Custom properties

Stars

129 stars

Watchers

2 watching

Forks

17 forks
Report repository

Releases

Packages

Used by

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.