terror / eye

A local rust-crate visualization tool
Creative Commons Zero v1.0 Universal
2 stars 0 forks source link

Needs some usage tips #1

Open xandkar opened 1 month ago

xandkar commented 1 month ago

Sounds exciting, but how do I use it?

I tried this:

$ cargo run -- --crate-path . serve
    Finished dev [unoptimized + debuginfo] target(s) in 0.03s
     Running `target/debug/eye --crate-path . serve`
2024-07-12T18:39:18.820155Z  INFO eye: Listening on port: 8000
thread 'tokio-runtime-worker' panicked at src/main.rs:73:8:
called `Option::unwrap()` on a `None` value
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
$ curl -i http://localhost:8000/api/graph
curl: (52) Empty reply from server
terror commented 1 month ago

Yo! Definitely not ready to use at all, still fleshing out ideas for this.

If you really want to run it take a look at the justfile, there's a dev command I use to run both the client and the server simultaneously.

dev *args:
  bunx concurrently \
    --kill-others \
    --names 'server,client' \
    --prefix-colors 'green.bold,magenta.bold' \
    --prefix '[{name}] ' \
    --prefix-length 2 \
    --success first \
    --handle-input \
    --timestamp-format 'HH:mm:ss' \
    --color \
    -- \
    'just watch run -- {{args}} serve' \
    'bun run dev'

I run just dev --crate-path <crate-path>, by default the web app is available at http://localhost:5173/ and the server at http://localhost:8000/.

Eventually when I'm ready to distribute it I'll serve the static assets with the server.

terror commented 1 month ago

You should end up seeing a graph like this

Screenshot 2024-07-12 at 2 46 25 PM

Still ideating on how I'm gonna hook up dependencies between syntactic items and also generate documentation / explanations using a local LLM connection.