Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/silverrainz/go-ssaviz
Visualize Go SSA function using Graphviz
https://github.com/silverrainz/go-ssaviz
golang graphviz linter ssa static-analysis
Last synced: 2 months ago
JSON representation
Visualize Go SSA function using Graphviz
- Host: GitHub
- URL: https://github.com/silverrainz/go-ssaviz
- Owner: SilverRainZ
- License: apache-2.0
- Created: 2023-02-26T02:35:52.000Z (almost 2 years ago)
- Default Branch: master
- Last Pushed: 2023-03-29T05:04:07.000Z (almost 2 years ago)
- Last Synced: 2024-10-25T11:41:37.381Z (2 months ago)
- Topics: golang, graphviz, linter, ssa, static-analysis
- Language: Go
- Homepage: https://silverrainz.me/go-ssaviz/
- Size: 93.8 KB
- Stars: 50
- Watchers: 2
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# go-ssaviz
![cover](pkg/ssaviz/testdata/svg/buildHTML.svg)
Visualize Go SSA function using Graphviz.
## Introduction
This tool provides a visual overview of Go SSA function using Graphviz. This is especially useful in SSA-based static analysis.
## Features
- [x] Visualize [Control-flow Graph (CFG)](https://en.wikipedia.org/wiki/Control-flow_graph)
- [ ] Visualize [Dominator Tree](https://en.wikipedia.org/wiki/Dominator_(graph_theory))
- [ ] SSA instruction alignment and syntax highlight
- [ ] Drag to browse## Requirements
- Go 1.18
- Graphviz (You should have `dot` command in your `$PATH`)## Usage
Install go-ssaviz CLI tools:
```console
$ go install github.com/SilverRainZ/go-ssaviz@latest
```You should make sure `GOBIN` (usually `~/go/bin`) is in your `$PATH`.
Then:```console
$ cd path_to_your_go_package
$ go-ssaviz ./...
```A report file `ssaviz.html` will be generated in the current directory.
See output of `go-ssaviz -help` for more details.### Go Packages
We also provides a separated Go package:
```console
$ go get -u github.com/SilverRainZ/go-ssaviz/pkg/ssaviz
```See [![godoc](https://pkg.go.dev/badge/github.com/SilverRainZ/go-ssaviz/pkg/ssaviz)](https://pkg.go.dev/github.com/SilverRainZ/go-ssaviz/pkg/ssaviz) for more details.
## Contact
Author: [Shengyu Zhang](https://silverrainz.me)