Cargo workspace: crates/ipx and a shared crates/feed (#202)
The first step of the split (#207). The daemon moves to crates/ipx unchanged; feed.rs becomes crates/feed (ipx-feed), which the directory service (#204) will share for its metadata refresher and its privacy check. To stand alone, fetch takes the feed's address and its credentials instead of ipx's config::Feed (config::Feed::auth gives them), collect_outlines moves in with the OPML parsing, and the address half of looks_private is feed::url_looks_private. ipx imports the crate as `feed` at its root, so every crate::feed path is unchanged. The version is the workspace's, in the root Cargo.toml. Checked: cargo test on Postgres (118 + 29), tsc, page smoke, native bridge, contrast and Playwright (72) pass; the image built from the new Dockerfile is deployed and healthy. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
15
Dockerfile
15
Dockerfile
@@ -11,17 +11,20 @@ WORKDIR /src
|
||||
COPY package.json package-lock.json ./
|
||||
RUN npm ci --omit=dev
|
||||
|
||||
# Dependencies first, so editing the source does not rebuild librqbit every time.
|
||||
# Dependencies first, so editing the source does not rebuild librqbit every time: each crate of
|
||||
# the workspace as an empty stub, its manifest real.
|
||||
COPY Cargo.toml Cargo.lock ./
|
||||
RUN mkdir src && echo 'fn main(){}' > src/main.rs \
|
||||
COPY crates/ipx/Cargo.toml crates/ipx/
|
||||
COPY crates/feed/Cargo.toml crates/feed/
|
||||
RUN mkdir -p crates/ipx/src crates/feed/src \
|
||||
&& echo 'fn main(){}' > crates/ipx/src/main.rs && touch crates/feed/src/lib.rs \
|
||||
&& cargo build --release --locked \
|
||||
&& rm -rf src
|
||||
&& rm -rf crates/ipx/src crates/feed/src
|
||||
|
||||
COPY build.rs ./
|
||||
COPY src ./src
|
||||
COPY crates ./crates
|
||||
COPY web ./web
|
||||
# cargo skips a rebuild if mtimes look untouched; make sure it does not.
|
||||
RUN touch src/main.rs && cargo build --release --locked
|
||||
RUN touch crates/ipx/src/main.rs crates/feed/src/lib.rs && cargo build --release --locked
|
||||
|
||||
FROM debian:trixie-slim
|
||||
# ffmpeg is DeadAir's (#171): it finds the silences and copies the frames kept. Debian's adds
|
||||
|
||||
Reference in New Issue
Block a user