Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Building from Source

Clone

git clone https://github.com/url2ref/url2ref.git
cd url2ref

Build CLI

cargo build --release --bin url2ref-cli

Binary: target/release/url2ref-cli

Install globally:

cargo install --path url2ref-cli

Build Web Interface

cd url2ref-web/npm
npm install
./build.sh
cd ../..
cargo build --release --bin url2ref-web

Run:

cargo run --bin url2ref-web
# Server at http://localhost:8000

Build Library Only

cargo build -p url2ref

Or as a dependency:

[dependencies]
url2ref = { git = "https://github.com/url2ref/url2ref" }

Tests & Docs

cargo test
cargo doc --no-deps --open
cargo build --target x86_64-unknown-linux-musl --release

Troubleshooting

libcurl not found

Linux:

sudo apt install libcurl4-openssl-dev  # Debian/Ubuntu
sudo dnf install libcurl-devel          # Fedora

macOS:

brew install curl
export PKG_CONFIG_PATH="/usr/local/opt/curl/lib/pkgconfig"

OpenSSL errors

Linux:

sudo apt install libssl-dev pkg-config  # Debian/Ubuntu

macOS:

brew install openssl
export OPENSSL_DIR=$(brew --prefix openssl)

SCSS compilation fails

Ensure you have the latest npm packages:

cd url2ref-web/npm
rm -rf node_modules
npm install
./build.sh

Next Steps