Skip to content
This repository was archived by the owner on Sep 9, 2025. It is now read-only.

Latest commit

 

History

History
 
 

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 

README.md

stack-graphs

The stack-graphs crate provides a Rust implementation of stack graphs, which allow you to define the name resolution rules for an arbitrary programming language in a way that is efficient, incremental, and does not need to tap into existing build or program analysis tools.

To use this library, add the following to your Cargo.toml:

[dependencies]
stack-graphs = "0.12"

Check out our documentation for more details on how to use this library.

Notable changes for each version are documented in the release notes.

Lua bindings

This crate includes optional Lua bindings, allowing you to construct stack graphs using Lua code. Lua support is only enabled if you compile with the lua feature. This feature is not enough on its own, because the mlua crate supports multiple Lua versions, and can either link against a system-installed copy of Lua, or build its own copy from vendored Lua source. These choices are all controlled via additional features on the mlua crate.

When building and testing this crate, make sure to provide all necessary features on the command line:

$ cargo test --features lua,mlua/lua54,mlua/vendored

When building a crate that depends on this crate, add a dependency on mlua so that you can set its feature flags:

[dependencies]
stack-graphs = { version="0.13", features=["lua"] }
mlua = { version="0.9", features=["lua54", "vendored"] }

Credits

Stack graphs are heavily based on the scope graphs framework from Eelco Visser's group at TU Delft.

License

Licensed under either of

at your option.