FerryDocs
ContributingWeb client

How the dashboard gets into ferryd

The build script of ferry-api puts each file of web/dist into the ferryd binary.

Edit on GitHub

npm run build. It writes web/dist/index.html and web/dist/assets/*.

1 / 3

The contains the dashboard. Thus ferryd needs no other file to serve it.

The build script

CaseWhat the build script embeds
web/dist existsEach file of web/dist
FERRY_WEB_DIST has a valueEach file of that directory
No built clientA placeholder page that explains how to build the client

Because of the placeholder, the Rust workspace always compiles.

Try a build with no Rust compile

To try a production build in a real server, point ferryd at the directory:

Terminal
cd web && npm run build && cd ..
FERRY_UI_DIR=web/dist ./target/debug/ferryd

ferryd then serves the files of web/dist from the disk. What ferryd answers gives the rules for each path.

On this page