Commit graph

8 commits

Author SHA1 Message Date
5afe3b61fb
♻️ bevy_vanth, vanth, vanth_derive, vanth_transport: Many changes in preparation for networking
- Created new crate `bevy_vanth` with basic plugin structure for Bevy integration.
- Refactored `Id` generation in `vanth` to use `OsRng` and removed redundant `to_u128_pair`/`from_u128_pair` methods.
- Moved networking functionality into new `net` module with `Node`, `Packet`, and `Message` types.
- Updated `vanth_derive` to use `proc-macro-crate` for reliable crate path resolution.
- Added `rand` dependency to replace custom ID generation logic.
- Updated `Cargo.toml`/`Cargo.lock` with new dependencies: `bevy_app`, `nix`, `cfg_aliases`, `proc-macro-crate`.
- Modified `README.md` with improved project description.
- Added commented clippy check in `flake.nix`.
- Added `smol`, `async-process`, and `async-trait` dependencies in root and `vanth` crate.
- Integrated `vanth` crate into `bevy_vanth` and added serde dependency.
- Reorganized test files into module structure for `cli` and `vanth` crates.
- Created new modules `compress` and `ecc` in `vanth`.
- Implemented `Node` with async `run` method and `Backend` trait for networking in `vanth`.
- Renamed `Memory` backend to `InMemoryStore` in `vanth` store module.
2025-09-08 10:06:00 +03:00
ff57ee8deb
📝 cli, vanth, meta, flake: Simplify dependencies, add meta crate, and improve docs
- Removed dependencies `sqlx` and `bevy_app` to simplify the project.
- Added new crate `vanth_meta` for generating example SVGs.
- Updated CLI tests to use `assert_cmd` for better test assertions.
- Enhanced README with comprehensive library and CLI usage documentation.
- Modified `Store::write` in `vanth` crate to return the content hash.
- Set `checkPhase` to empty in Nix flake configuration.
2025-08-11 12:59:29 +03:00
1001819e4c
🐛🧪 cli, vanth: Fix SQLite store bug and add CLI tests
- Modified `Sqlite::get_all_of_ty` to return stored rows instead of empty results.
- Added `Send` requirement to `Backend` trait.
- Implemented `ContentHash::hex` method for hexadecimal representation.
- Added integration test for CLI `write` and `get` commands with `run_vanth` helper.
- Configured CLI tracing to log to stderr instead of stdout.
- Added `serde` dependency to `cli` crate for test struct serialization.
- Modified `handle_write` to print content hash after successful storage.
2025-08-10 18:50:53 +03:00
af6bfadff8
🐛♻️ cli, vanth, vanth tests: Refactor store initialization and add trace logging
- Fixed CLI commands to prevent creating databases unnecessarily by using `StoreParams` with `create_if_not_exists: false` for `get`, `get_all`, `delete`, and `delete_all` commands.
- Refactored `Store::sqlite_from_path` to accept `StoreParams` and dynamically generate SQLite open flags.
- Added trace logging for received JSON content in `handle_write` command.
2025-08-07 16:27:39 +03:00
a91d92b6ff
♻️ cli, vanth: Implement CLI commands and enhance store
- Added `write`, `get`, `get-all`, `delete`, and `delete-all` subcommands to the CLI.
- Refactored store operations to support raw type handling and removed `Vanth` trait requirement where possible.
- Implemented tracing-based logging with console output for improved observability.
- Improved SQLite store error handling with specific cases for missing tables.
- Added new dependencies including `tracing`, `tracing-subscriber`, `nu-ansi-term`, `sharded-slab`, and `valuable`.
- Removed `.zed/settings.json` editor configuration file.
2025-08-07 16:11:54 +03:00
9e7979931c
♻️🍱 config, cli, vanth, vanth_derive, varo: Reformatted code and added editor configuration files
- Added `.zed/settings.json` to configure rust-analyzer with `leptosfmt`.
- Created `rustfmt.toml` with max width 120 and comment wrapping settings.
- Applied consistent formatting across all modified crates using rustfmt.
- Reorganized import statements and improved code style in multiple modules.
2025-08-07 12:49:33 +03:00
b36f178999
🧪♻️ vanth, vanth_derive: Add derive macro for Vanth trait implementation
- Added `vanth_derive` crate with a procedural macro to automatically implement the `Vanth` trait for structs, including generics.
- Refactored `vanth` crate by removing obsolete `vanth.rs` file.
- Implemented `PartialEq` for `Ty` to enable comparisons with string values and another `Ty`.
- Added integration tests for deriving `Vanth` with generic parameters.
- Updated dependencies: added `quote`, `syn`, and `proc-macro2` crates.
2025-08-05 14:51:29 +03:00
8b76fcb659
♻️💩 cli, vanth, Cargo.toml, Cargo.lock: Add CLI framework and refactor vanth crate structure
- Added a new `vanth_cli` crate with `clap` command structure for `vanth fs open/save` commands.
- Removed `main.rs` from `vanth` crate as it is now a library without a binary target.
- Added `fs.rs` module and new structs `HashedValue`, `Value`, `Ty` with `Vanth` trait to support serialization.
- Updated `Cargo.toml` to include `clap` as a workspace dependency and added `vanth_cli` as a new crate.
- Added multiple dependencies (`anstream`, `anstyle`, `clap`, `heck`, etc.) in `Cargo.lock` to support the CLI.
- Created placeholder test files `tests/fs/mod.rs` and `tests/main.rs` in `vanth` crate for future use.
- Marked CLI command implementations with TODOs as functionality is not yet implemented.
2025-08-04 21:36:25 +03:00