Commit graph

5 commits

Author SHA1 Message Date
b927702ee2
📝 README.md, varo: Fix documentation errors and add new README
- Corrected `Data::<ty()` to `Data::ty()` and added quotes around the example string in main README.
- Changed "derivation" to "derive macro" in the main README explanation.
- Updated all Nix run commands to use full `git+https` URLs with `.git` extension.
- Created a new README for the `varo` crate describing its planned purpose.
2025-08-11 13:23:16 +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
87957bfbf8
♻️📝 vanth, varo: Refactor storage backend, fix distribution sampling, and enhance type handling
- Refactored `Store` to use a trait-based backend with type-specific tables, replacing the previous enum approach.
- Implemented `Sqlite` and `Memory` backends with proper table management and type-aware operations.
- Added serialization/deserialization handling in `Store` using `serde_json`.
- Implemented `ToString` for `Ty` and improved equality comparisons using string representation.
- Fixed `Distribution::sample` in `varo` to correctly handle 0, 1, and 2+ moments cases.
- Updated store integration tests to verify type-specific storage operations including write, read, and deletion.
- Commented out unfinished `EntityContents` and related structs pending future implementation.
2025-08-07 12:05:55 +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