Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/willcrichton/example-analyzer
https://github.com/willcrichton/example-analyzer
Last synced: 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/willcrichton/example-analyzer
- Owner: willcrichton
- Created: 2020-12-09T01:03:59.000Z (about 4 years ago)
- Default Branch: master
- Last Pushed: 2022-02-15T03:43:50.000Z (almost 3 years ago)
- Last Synced: 2024-04-14T18:47:17.979Z (8 months ago)
- Language: Rust
- Size: 101 MB
- Stars: 5
- Watchers: 4
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# example-analyzer
This repo is now out of date. Please see the newer implementation described in the [RFC](https://github.com/rust-lang/rfcs/pull/3123).
## Setup
```bash
git clone -b linked-examples https://github.com/willcrichton/rust
cd rust
./x.py build
# replace `apple-darwin` with your current target as appropriate
rustup toolchain link custom-rustdoc build/x86_64-apple-darwin/stage1
cd ..
git clone https://github.com/willcrichton/example-analyzer
cd example-analyzer
cargo build
```## Example
```bash
# NOTE: the directory you run this from is important since the project uses
# `rust-toolchain`
# On MacOS, use `DYLD_LIBRARY_PATH` instead.
export LD_LIBRARY_PATH=$(rustc --print sysroot)/lib
cd doctest
../target/debug/example-analyzer
cargo +custom-rustdoc rustdoc --open -- -Z unstable-options \
--repository-url $(git remote get-url origin)/tree/$(git rev-parse HEAD) \
--call-locations .call_locations.json
```## Development
If you change the Rust repo (i.e. rustdoc) then run:
```
(cd ../../rust && ./x.py build)
# also re-run `cargo rustdoc`
```If you change example-analyzer then run:
```
(cd .. && cargo build)
../target/debug/example-analyzer
# also re-run `cargo rustdoc`
```