Remove Rust code, delegate server to nuwiki-rs repo
CI / cargo clippy (pull_request) Failing after 42s
CI / cargo fmt --check (pull_request) Failing after 45s
CI / cargo test (pull_request) Failing after 49s
CI / editor keymaps (pull_request) Has been skipped

Delete all Rust crates (crates/) and Cargo files. The nuwiki-ls binary
is now built in the separate nuwiki-rs repository and downloaded at
install time from the Gitea release assets, with a cargo build fallback
that clones nuwiki-rs.

Update all documentation to reflect the split repo layout.
This commit is contained in:
gffranco
2026-06-24 12:57:15 +00:00
parent 0df72e52ea
commit cb11889e72
81 changed files with 234 additions and 26425 deletions
+27 -13
View File
@@ -10,7 +10,7 @@
# Exports:
# REPO_ROOT / DEV_DIR / WIKI_DIR — common paths
# log — prefixed status line
# ensure_binary — build + symlink nuwiki-ls
# ensure_binary — verify nuwiki-ls exists (download if missing)
# write_sample_wiki DIR — lay down the feature-showcase wiki
# reset_dirs DIR... — wipe + recreate owned state dirs
# seed_wiki — (re)seed WIKI_DIR fresh each run; never
@@ -27,20 +27,34 @@ log() { printf '\033[1;34m[nuwiki-dev]\033[0m %s\n' "$*"; }
ensure_binary() {
local bin="$REPO_ROOT/bin/nuwiki-ls"
local built="$REPO_ROOT/target/release/nuwiki-ls"
if [[ "${NUWIKI_DEV_SKIP_BUILD:-0}" == "1" ]]; then
if [[ ! -x "$bin" ]]; then
log "NUWIKI_DEV_SKIP_BUILD=1 but $bin is missing — building anyway"
else
log "NUWIKI_DEV_SKIP_BUILD=1 — using existing $bin"
return
fi
if [[ -x "$bin" ]]; then
log "binary ready: $bin"
return
fi
if [[ "${NUWIKI_DEV_SKIP_BUILD:-0}" == "1" ]]; then
log "NUWIKI_DEV_SKIP_BUILD=1 but $bin is missing"
return 1
fi
log "downloading nuwiki-ls…"
vim -e -s -c "source $REPO_ROOT/scripts/download_bin.vim" -c "q"
if [[ -x "$bin" ]]; then
log "binary ready: $bin"
return
fi
log "download failed, falling back to cargo build from nuwiki-rs…"
local rs_repo="$REPO_ROOT/nuwiki-rs"
if [[ ! -f "$rs_repo/Cargo.toml" ]]; then
log "cloning nuwiki-rs …"
git clone --depth 1 https://code.gfran.co/gffranco/nuwiki-rs.git "$rs_repo"
fi
cargo build --release -p nuwiki-ls --manifest-path "$rs_repo/Cargo.toml"
if [[ ! -f "$rs_repo/target/release/nuwiki-ls" ]]; then
log "cargo build failed"
return 1
fi
log "building nuwiki-ls (release)…"
cargo build --release -p nuwiki-ls --manifest-path "$REPO_ROOT/Cargo.toml"
mkdir -p "$REPO_ROOT/bin"
ln -sf "$built" "$bin"
log "binary ready: $bin (built $(date -r "$built" '+%Y-%m-%d %H:%M:%S'))"
ln -sf "$rs_repo/target/release/nuwiki-ls" "$bin"
log "binary ready: $bin"
}
# write_sample_wiki DIR — lay down a fixture that exercises every vimwiki