Skip to content

Commit 64fb92d

Browse files
sync from internal repository
1 parent 1758dc2 commit 64fb92d

34 files changed

Lines changed: 240 additions & 70 deletions

AGENTS.md

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -21,19 +21,28 @@ bin/bump-version # Bump version (--patch, --minor (default), --major)
2121
## Architecture
2222

2323
```
24-
crates/bookmarks-cli/ # Core Rust crate (dkdc-bookmarks on crates.io, bookmarks binary)
25-
src/lib.rs # Library root
24+
crates/bookmarks-core/ # Core library (config, storage, open, strings)
25+
src/lib.rs # Library root — re-exports Config, Storage, TomlStorage
26+
src/config.rs # Config struct, validation, parsing, editing
27+
src/storage.rs # Storage trait (backend-agnostic)
28+
src/toml_storage.rs # TOML file storage implementation
29+
src/open.rs # Link resolution (alias → link → URI) and opening
30+
src/strings.rs # Shared string constants and error templates
31+
crates/bookmarks-app/ # iced desktop app
32+
src/lib.rs # Desktop UI (depends on bookmarks-core)
33+
assets/icon.png # App window icon
34+
crates/bookmarks-webapp/ # Axum HTMX webapp (port 1414)
35+
src/lib.rs # Web UI (depends on bookmarks-core)
36+
crates/bookmarks-cli/ # CLI binary (dkdc-bookmarks on crates.io)
2637
src/main.rs # Binary entry point
38+
src/lib.rs # Re-exports core + run_cli
2739
src/cli.rs # CLI (clap) with -f, --app, --webapp flags
28-
src/config.rs # Config loading/saving
29-
src/open.rs # Link resolution (alias → link → URI)
30-
src/app.rs # iced desktop app (behind `app` feature flag)
31-
src/webapp.rs # Axum HTMX webapp on port 1414 (behind `webapp` feature flag)
32-
assets/icon.png # App window icon
3340
crates/bookmarks-py/ # PyO3 bindings (cdylib)
3441
py/bookmarks/ # Python wrapper + type stubs (core.pyi, py.typed)
3542
```
3643

44+
Feature flags on `bookmarks-cli`: `app` (pulls in bookmarks-app), `webapp` (pulls in bookmarks-webapp).
45+
3746
Config resolution: `-f` flag > `./bookmarks.toml` (cwd) > `~/.config/bookmarks/bookmarks.toml` (global).
3847

3948
Config structure: aliases map to links, links map to URIs, groups expand to multiple aliases/links.

Cargo.lock

Lines changed: 32 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
[workspace]
22
resolver = "2"
3-
members = ["crates/bookmarks-cli"]
3+
members = [
4+
"crates/bookmarks-core",
5+
"crates/bookmarks-app",
6+
"crates/bookmarks-webapp",
7+
"crates/bookmarks-cli",
8+
]
49
exclude = ["crates/bookmarks-py"]
510

611
[profile.release]

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Copyright 2025 Cody
1+
Copyright 2026 Cody
22

33
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
44

bin/build-rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@ set -euo pipefail
33
cd "$(dirname "${BASH_SOURCE[0]}")/.."
44

55
echo "Building bookmarks..."
6-
cargo build --manifest-path crates/bookmarks-cli/Cargo.toml --features app,webapp "$@"
6+
cargo build --features app,webapp "$@"
77

88
echo "Rust build complete!"

bin/bump-version

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,9 @@ BUMP="${BUMP:-minor}"
4040

4141
TOML_FILES=(
4242
pyproject.toml
43+
crates/bookmarks-core/Cargo.toml
44+
crates/bookmarks-app/Cargo.toml
45+
crates/bookmarks-webapp/Cargo.toml
4346
crates/bookmarks-cli/Cargo.toml
4447
crates/bookmarks-py/Cargo.toml
4548
)
@@ -79,6 +82,17 @@ for f in "${TOML_FILES[@]}"; do
7982
echo " updated $f"
8083
done
8184

85+
# update inter-crate dependency versions
86+
for f in crates/bookmarks-app/Cargo.toml crates/bookmarks-webapp/Cargo.toml crates/bookmarks-cli/Cargo.toml; do
87+
sed -i '' "s/dkdc-bookmarks-core = { version = \"$CURRENT\"/dkdc-bookmarks-core = { version = \"$NEW\"/" "$f"
88+
echo " updated dep version in $f"
89+
done
90+
for f in crates/bookmarks-cli/Cargo.toml; do
91+
sed -i '' "s/dkdc-bookmarks-app = { version = \"$CURRENT\"/dkdc-bookmarks-app = { version = \"$NEW\"/" "$f"
92+
sed -i '' "s/dkdc-bookmarks-webapp = { version = \"$CURRENT\"/dkdc-bookmarks-webapp = { version = \"$NEW\"/" "$f"
93+
echo " updated dep versions in $f"
94+
done
95+
8296
# ---------- regenerate lock files ----------
8397

8498
echo "Regenerating lock files..."

bin/check-rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@ set -euo pipefail
33
cd "$(dirname "${BASH_SOURCE[0]}")/.."
44

55
echo "Checking Rust formatting..."
6-
cargo fmt --manifest-path crates/bookmarks-cli/Cargo.toml -- --check
6+
cargo fmt -- --check
77

88
echo "Running clippy..."
9-
cargo clippy --manifest-path crates/bookmarks-cli/Cargo.toml --features app,webapp -- -D warnings
9+
cargo clippy --features app,webapp -- -D warnings
1010

1111
echo "Running Rust tests..."
12-
cargo test --manifest-path crates/bookmarks-cli/Cargo.toml --features app,webapp
12+
cargo test --features app,webapp
1313

1414
echo "Rust checks passed!"

bin/install-py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@ set -euo pipefail
33
cd "$(dirname "${BASH_SOURCE[0]}")/.."
44

55
echo "Installing bookmarks CLI via uv..."
6-
uv tool install .
6+
uv tool install . --force
77

88
echo "Python install complete!"

bin/release-crates-io

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,16 @@
22
set -euo pipefail
33
cd "$(dirname "${BASH_SOURCE[0]}")/.."
44

5+
echo "Publishing dkdc-bookmarks-core to crates.io..."
6+
cargo publish -p dkdc-bookmarks-core
7+
8+
echo "Publishing dkdc-bookmarks-app to crates.io..."
9+
cargo publish -p dkdc-bookmarks-app
10+
11+
echo "Publishing dkdc-bookmarks-webapp to crates.io..."
12+
cargo publish -p dkdc-bookmarks-webapp
13+
514
echo "Publishing dkdc-bookmarks to crates.io..."
6-
cargo publish --manifest-path crates/bookmarks-cli/Cargo.toml
15+
cargo publish -p dkdc-bookmarks
716

817
echo "Published!"

crates/bookmarks-app/Cargo.toml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
[package]
2+
name = "dkdc-bookmarks-app"
3+
version = "0.2.0"
4+
edition = "2024"
5+
authors = ["Cody <cody@dkdc.dev>"]
6+
description = "Desktop app for bookmarks (iced)"
7+
repository = "https://github.com/lostmygithubaccount/bookmarks"
8+
license = "MIT"
9+
readme = "README.md"
10+
11+
[lib]
12+
name = "bookmarks_app"
13+
path = "src/lib.rs"
14+
15+
[dependencies]
16+
dkdc-bookmarks-core = { version = "0.2.0", path = "../bookmarks-core" }
17+
iced = { version = "0.14", features = ["tokio", "svg"] }
18+
open = "5"
19+
png = "0.17"

0 commit comments

Comments
 (0)