feat: enhanced cargo workspace, NM usage, Dockerfile

This commit is contained in:
rzmk 2026-06-15 11:20:51 -04:00
parent 71b08a53f0
commit 3a79fb2b0a
18 changed files with 362 additions and 2478 deletions

9
bulk_loader/Cargo.toml Normal file
View file

@ -0,0 +1,9 @@
[package]
name = "bulk_loader"
version = "0.1.0"
edition = "2024"
[dependencies]
anyhow = "1.0.102"
reqwest = "0.13.4"
tokio = { version = "1.52.1", features = ["full"] }

9
bulk_loader/Dockerfile Normal file
View file

@ -0,0 +1,9 @@
FROM rust:1.96 AS builder
WORKDIR /app
RUN rustup set profile minimal
COPY . .
RUN cargo build --release
FROM ubuntu:latest
COPY --from=builder /app/target/release/bulk_loader /
ENTRYPOINT ["/bulk_loader"]

17
bulk_loader/src/main.rs Normal file
View file

@ -0,0 +1,17 @@
use anyhow::Result;
#[tokio::main]
async fn main() -> Result<()> {
// Get latest release data which is organized as a single JSONL file
// at https://github.com/dathere/ckan_geoconnex_bulk_runner/releases/latest
let body = reqwest::get("https://github.com/dathere/ckan_geoconnex_bulk_runner/releases/latest/download/ckan-geoconnex-web-resources.jsonl")
.await?
.text()
.await?;
// Print each line to stdout
for line in body.lines() {
println!("{line}");
}
Ok(())
}