Commit graph

13 commits

Author SHA1 Message Date
3b193c5aa3
♻️ bevy_vanth, vanth, vanth_derive, flake: Add Bevy integration crate and refactor entity/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`.
2025-08-17 11:56:34 +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
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
db531c8c73
🧪 workspace, varo: Implement RNG with ChaCha8 and add optimization function
- Updated `Cargo.toml` and `Cargo.lock` to downgrade `rand_core` to 0.6.4 and add `rand_chacha` dependency with `serde1` feature.
- Implemented `Rng` struct wrapping `ChaCha8Rng` with seed initialization, stream selection, and number generation methods.
- Added `rng_new`, `rng_from_seed`, `rng_set_stream`, `rng_next_u32`, `rng_next_u64`, `rng_fill_bytes`, `rng_gen_f32`, and `rng_gen_gaussian` functions.
- Made `value` field in `Score` and `values` field in `OptimizationResult` public.
- Implemented `Distribution::sample` method that generates Gaussian numbers when moments are available.
- Added `From<f32>` implementation for `Score`.
- Implemented `optimize` function that evaluates candidates using cloned RNG streams and returns sorted results.
- Added integration test `test_optimize` that verifies optimization sorting behavior.
2025-08-06 16:46:58 +03:00
5614cfe95f
🧪💩 workspace, vanth, varo: Add varo crate and Root struct, update dependencies
- Replaced `bitcode` crate with `bincode` in workspace dependencies.
- Added new crate `varo` for random optimization with `Varo` trait, `Distribution`, and `optimize` function.
- Defined `Root` world struct placeholder in `vanth` crate.
- Created `reference.rs` test module in `vanth` with custom components and events.
- Added TODOs in `varo` for RNG implementation and `optimize` function.
2025-08-06 16:20:05 +03:00
a1cc9b6e04
vanth/store, tests: Add persistent SQLite and in-memory store backends with CRUD operations
- Added `rusqlite` and `sqlx` dependencies to support SQLite backend functionality for the store.
- Implemented `Store` struct with backend switching between in-memory (`HashMap`) and SQLite-based storage.
- Added CRUD operations (`read`, `write`, `delete`) to the `Store` API with error handling.
- Created integration tests for SQLite store persistence and basic operations.
2025-08-05 18:26:08 +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
45a68865b6
♻️🍱💩👷 crates/vanth, project: Refactor entity system and setup; migrate to Nix flakes
- Add `.cargo/config.toml` with target directory and rustflags configuration.
- Remove devenv files and set up Nix flake configuration with `flake.nix` and `flake.lock`.
- Add dependencies on `blake3`, `digest`, and hashing-related crates for content hashing functionality.
- Implement `EntityId` as hashed representation and `ContentHash` component using Blake3.
- Add `hashing_serializer` module for serializing and hashing components.
- Remove unused `parser` module and restructure lib.rs with new `Reference` type and storage interfaces.
- Add test files for `store` and `reference` functionality with TODOs for implementation.
- Introduce `VanthPlugin` skeleton and entity save/load interfaces with placeholder implementations.
- Add `Reference` type with retrieval state machine and async handling stubs.
2025-08-04 21:03:15 +03:00
be75844fdd
vanth, workspace: Add entity ID system and serialization dependencies
- Added new modules `entity` and `store` to `vanth` crate for ECS foundations
- Implemented generic `Id` type with serialization/deserialization support
- Introduced `serde` and `serde_json` dependencies in workspace and vanth crate
- Defined `Vanth` struct and `ContentHash` component in `lib.rs`
- Added placeholder `Store` component in new module
- Updated workspace configuration with `resolver = "3"` and dependency versions
2025-07-23 10:40:23 +03:00
ccad41ab9e
Refactor: Convert project to a Bevy-based workspace and node
This commit refactors the Vanth project to utilize a `Cargo.toml` workspace,
encapsulating the core logic within a `vanth` library crate. The existing
`src` files are moved into the new `vanth/src` directory.

The primary change is the integration of the Bevy game engine as the
underlying framework for the Vanth node, shifting from the previous
`whirlwind` dependency. This transition is reflected in `Cargo.toml`
updates, adding `bevy_app` and `bevy_ecs` as dependencies and removing
`whirlwind`.

A new test file `vanth/tests/test_node.rs` is introduced to cover the
initial functionality of the `Node` struct. The `LICENSE` year range is
also updated.

This refactoring sets the stage for Vanth's evolution into a distributed
ECS-based database model, leveraging Bevy's robust ECS capabilities.
2025-07-12 22:59:41 +03:00
f7d089e64d
Init commit 2024-11-14 23:24:15 +00:00