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
- CLI Usage - Learn to use the command-line tool
- Web Interface - Set up the web interface
- API Documentation - Library API reference