SCIP indexer for Zig. Experimental.
Our benchmark for scip-zig
is its ability to index std
; unfortunately importing external packages via addPackage
isn't supported yet.
- Globals
- Properly creating multiple indices for different packages
- Imports
- Namespaced declarations (structs, enums, unions)
- Functions
- Arguments
- Return values
- Bodies
- Locals
- With explicit typing
- With inferred typing
- Easy integration into
build.zig
/ CI -
usingnamespace
-
comptime
To install scip-zig
, simply git clone
this repository and run zig build
; you'll find the indexer in zig-out/bin
!
# To index std; currently uses about a 400mbs of memory
# Windows: should finish in under 10 seconds in release-fast, under a minute in debug
# WSL: should finish in under 3 seconds in release-fast
scip-zig --root-path /path/to/zig --pkg std /path/to/zig/lib/std/std.zig --root-pkg std
src code-intel upload -github-token=$(cat tok) -file=index.scip
For example, let's index this very repo:
zig-out/bin/scip-zig --root-path $(pwd) --pkg scip-zig $(pwd)/src/main.zig --root-pkg scip-zig
scip convert --from index.scip
src code-intel upload -github-token=$(cat tok) -file=index.scip