This repository has been archived by the owner on Nov 14, 2021. It is now read-only.
forked from dobkeratops/rustfind
-
Notifications
You must be signed in to change notification settings - Fork 0
/
README
59 lines (42 loc) · 1.99 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
Uses rust libsyntax to find symbol definitions
and generates HTML view of source with links
finds struct-defs, functions, methods, fields
writes ast node def info into '.rfx' files in plaintext.
"make" to compile and run test program
"make rustsrc" to generate HTML source for the main rust source tree at $(RUST_PATH)/src
./rustfind -h to display options
./rustfind cratename.rs sourcefile.rs:line:col
... compiles 'cratename.rs',then shows the
location&definition referenced by sourcefile:line:col
./rustfind -j cratename.rs -- dump spans & node definition links as JSON
./rustfind -w cratename.rs -- creates HTML view of sourcecode
roadmap
[1] a commandline tool rustfind sourcefile.rs:LINE:COLUMN: --> definition.rs:LINE:col
(to add add hoc navigation tools eg gedit external tools)
[.1] CTAGS generation ??
[.1] interactive commandline tool (enter src/location/symbol-> dump location)
[.2] possibly queries like "list all the functions that use this type, list all the impls' for this type.."
[.3] links to Rustdoc ?
[2] JSON / or other dump
.. are there any formats IDE's read for their indexers?
[3] options to dump/pretty print more context for the definitoon
[4] an html hyperlinked source generator, like woboq?
... + popup type annotaions?
[5] use components for IDE integration?
Notes on sourcecode:-
--------------------
-find_ast_node contains the node scanning
-borrows code from rustdoc_ng
-there might be a fair amoount of repition with the compiler internals eg ast node wrappers,
this can be cleaned up..
-a lot here would factor out if ctxt had a node_id:span map
Other:-
-------
improved syntax highlighting rust.lang & required styles (for gtksourceview) included in scripts
more ideas
can ctags actually deal with overloaded symbols?
could we write out an intermediate that editors can read for fast jump-to-def, with some dynamic context ..
.rfx format:
------------
libname node_id source-file-name line col length kind [identifier]
jdef nodeid libname def_node_id