From bc0b6926dc930678da4785834f35d233c7f4ced3 Mon Sep 17 00:00:00 2001 From: Bruno Eidam Guerios Date: Mon, 11 May 2026 12:14:21 -0300 Subject: [PATCH] fix(quickstart): add -p flag to avoid libpq linker error from workspace deps --- .../tycho-simulation/examples/quickstart/Readme.md | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/crates/tycho-simulation/examples/quickstart/Readme.md b/crates/tycho-simulation/examples/quickstart/Readme.md index 59b3dd500b..f45ceb2232 100644 --- a/crates/tycho-simulation/examples/quickstart/Readme.md +++ b/crates/tycho-simulation/examples/quickstart/Readme.md @@ -7,9 +7,14 @@ This quickstart guide enables you to: ## How to run +> **Note:** Run with `-p tycho-simulation` to scope the build to this crate. Without it, Cargo +> resolves the full workspace dependency graph and pulls in `libpq` (a system PostgreSQL library +> required by the indexer crates), causing a linker error on machines without PostgreSQL installed. + ```bash +export TYCHO_API_KEY= export RPC_URL= -cargo run --release --example quickstart +cargo run --release -p tycho-simulation --example quickstart ``` By default, the example will trade 10 USDC -> WETH on Ethereum Mainnet. Setting the chain will by default trade 10 @@ -17,8 +22,9 @@ USDC -> WETH on that chain. If you want a different trade or chain, you can do: ```bash +export TYCHO_API_KEY= export RPC_URL= -cargo run --release --example quickstart -- --sell-token "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913" --buy-token "0x4200000000000000000000000000000000000006" --sell-amount 10 --chain "base" +cargo run --release -p tycho-simulation --example quickstart -- --sell-token "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913" --buy-token "0x4200000000000000000000000000000000000006" --sell-amount 10 --chain "base" ``` for 10 USDC -> WETH on Base. @@ -27,8 +33,9 @@ To be able to execute or simulate the best swap, you need to set your private ke ```bash unset HISTFILE +export TYCHO_API_KEY= export PRIVATE_KEY= -cargo run --release --example quickstart +cargo run --release -p tycho-simulation --example quickstart ``` See [here](https://docs.propellerheads.xyz/tycho) a complete guide on how to run the