roogle icon indicating copy to clipboard operation
roogle copied to clipboard

Document possibility of indexing user provided crates

Open philippeitis opened this issue 4 years ago • 0 comments

It is possible to index user provided crates like so:

export RUSTDOCFLAGS="-Zunstable-options --output-format=json"
cargo +nightly doc

Alternatively, in Rust:

std::process::Command::new("cargo")
    .arg("+nightly")
    .arg("doc")
    .env("RUSTDOCFLAGS", "-Zunstable-options --output-format=json")
    .env("CARGO_TARGET_DIR", &index_dir)
    .current_dir(crate_path)
    .output();

I think it would be useful to document this as an option somewhere in the roogle-engine documentation or README.md, or both. However, it does run into internal compiler errors, so it will not currently work for all projects.

philippeitis avatar Nov 01 '21 01:11 philippeitis