{"id":22747431,"url":"https://github.com/dekirisu/deki-rs","last_synced_at":"2025-04-12T22:41:50.250Z","repository":{"id":262411409,"uuid":"887008257","full_name":"dekirisu/deki-rs","owner":"dekirisu","description":"A collection of crates, functions and renames tailored to myself!","archived":false,"fork":false,"pushed_at":"2025-03-08T01:23:25.000Z","size":44,"stargazers_count":7,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-26T16:48:56.613Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dekirisu.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE-APACHE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-11-12T02:19:14.000Z","updated_at":"2025-03-25T11:58:35.000Z","dependencies_parsed_at":null,"dependency_job_id":"2f4aaf55-38d1-4776-a7b2-2b0839f825d4","html_url":"https://github.com/dekirisu/deki-rs","commit_stats":null,"previous_names":["dekirisu/deki-rs"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dekirisu%2Fdeki-rs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dekirisu%2Fdeki-rs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dekirisu%2Fdeki-rs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dekirisu%2Fdeki-rs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dekirisu","download_url":"https://codeload.github.com/dekirisu/deki-rs/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248643045,"owners_count":21138353,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-12-11T03:15:39.684Z","updated_at":"2025-04-12T22:41:50.243Z","avatar_url":"https://github.com/dekirisu.png","language":"Rust","funding_links":[],"categories":["Rust"],"sub_categories":[],"readme":"\u003ch1 align=\"center\"\u003e🦀 My Rusty Base 🦀\u003c/h1\u003e\n\u003cp align=\"center\"\u003e\n    \u003ca href=\"https://github.com/dekirisu/deki-rs\" style=\"position:relative\"\u003e\u003cimg src=\"https://img.shields.io/badge/github-dekirisu/deki-ee6677\"\u003e\u003c/a\u003e\n    \u003ca href=\"https://crates.io/crates/deki\" style=\"position:relative\"\u003e\u003cimg src=\"https://img.shields.io/crates/v/deki\"\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n## What is this?\n- A collection of crates, functions and renames I tend to use and rate as beeing 'general purpose'.\n- A base where I don't have to look up how things works.\n\n\u003e [!NOTE]\n\u003e This mainly exists so I can depend on it quick, easy and anywhere.\n\n\u003e [!IMPORTANT]\n\u003e Since this crate doesn't have a specific purpose, it may change a lot between 'minor' versions.\n\u003e That said, I'll follow semantic versioning of course! ✨\n\n## What does it do?\n- add `PhantomData` alias `Ghost`\n- re-export [maflow](https://github.com/dekirisu/maflow): all `*`\n- re-export [type_cell](https://github.com/dekirisu/type_cell): all `*`\n- re-export [buns](https://github.com/dekirisu/buns): `self` and `sandwich`\n- re-export [derive-new](https://github.com/nrc/derive-new): `new` as `Constructor`\n    - e.g. `#[derive(Constructor)] struct AStruct{field:u32}` -\u003e `AStruct::new(2);`\n- re-export [extension-traits](https://github.com/danielhenrymantilla/ext-trait.rs): `extension` as `ext`\n    - e.g. `#[ext(trait F32Ext)] impl f32 {fn plus(self,rhs:f32)-\u003ef32{self+rhs}}` -\u003e `4.0.plus(4.0);`\n- re-export [derive_more](https://github.com/JelteF/derive_more): `self` as `derive_more` and `drv`\n    - e.g. `#[derive(drv::Deref)] struct AStruct(#[deref]u32);`\n- derive presets, by using [derive_preset](https://github.com/dekirisu/derive_preset):\n    - `#[hashable(..)]` = `#[derive(PartialEq,Eq,Hash,Clone,Copy,..)]`\n    - `#[serde(..)]` = `#[derive(Serialize,Deserialize,Clone,..)]`\n    - `#[serde_hash(..)]` = `#[derive(Serialize,Deserialize,PartialEq,Eq,Hash,Clone,Copy,..)]`\n    - `#[deref(..)]` = `#[derive(drv::Deref,drv::DerefMut,..)]`\n    - Note: Assuming any `Hash` derivator is small and therefore fine to be copied!\n- auto-impl trait marker `Syncable` for anything implementing `'static+Send+Sync`\n    - mainly used as 'rename' to use in trait bounds\n- auto-impl trait `DefaultClear` for anything implementing `Default`, id adds `.clear()` to set it back to default\n- auto-impl trait `Lerpable` for any type with necessary maths to perform linear interpolation\n    - e.g. `3.0.lerp(4.0,0.1)` or any future type you impl maths for\n- auto-impl trait `LerpableDeref` for any type that derefs to a type with necessary maths to perform linear interpolation\n    - e.g. `#[deref] struct AStruct(#[deref]f32);` -\u003e `AStruct(3.0).lerp(AStruct(4.0),0.1)`\n- extend `f32` by `.smooth()` to apply cheap ease-in and -out (smooth-step) if within 0..=1\n- extend `f32` by `.clamp_unit()` = `.clamp(0.0,1.0)`\n- extend `Ramge\u003cT\u003e` \u0026 `RangeInclusive\u003cT\u003e` by `.add(T)` to offset it\n- macro `qonst!` (quick const): set a type and a value, name is automatically set to the type name in uppercase\n- (optional) re-export [fastrand](https://github.com/smol-rs/fastrand): `self` as `random`\n    - extend `Vec` by `.random()`\n- (optional) re-export [fastapprox](https://github.com/loony-bean/fastapprox-rs): all `*` (modified) as `approx`\n    - extend `f32` by `.{operation}_ca` (ca = circa (latin))\n\n## Synergies\nA struct with `PhantomData`:\n```rust\n#[derive(Constructor)]\npub struct AStruct\u003cT\u003e(u32,#[new(default)]Ghost\u003cT\u003e)\n// Construct somewhere:\nAStruct::\u003cString\u003e::new(3);\n```\nQuick smooth interpolation of a struct with a f32:\n```rust\n#[deref(Constructor,Clone)]\nstruct AStruct {a:u32,#[deref]b:f32}\n// run:\nlet from = AStruct::new(0,0.);\nlet to = AStruct::new(0,0.);\nfrom.lerp(to,progress.smooth())\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdekirisu%2Fdeki-rs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdekirisu%2Fdeki-rs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdekirisu%2Fdeki-rs/lists"}