{"id":13672145,"url":"https://github.com/vertexclique/cuneiform","last_synced_at":"2025-06-30T12:37:09.213Z","repository":{"id":57614677,"uuid":"230697306","full_name":"vertexclique/cuneiform","owner":"vertexclique","description":"Cache \u0026 In-Memory optimizations for Rust, revived from the slabs of Sumer.","archived":false,"fork":false,"pushed_at":"2020-02-22T22:59:03.000Z","size":2103,"stargazers_count":30,"open_issues_count":1,"forks_count":1,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-05-18T10:48:38.082Z","etag":null,"topics":["cache-coherence","cache-optimization","concurrency","data-structures","rust-lang"],"latest_commit_sha":null,"homepage":"https://docs.rs/cuneiform","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/vertexclique.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}},"created_at":"2019-12-29T03:24:51.000Z","updated_at":"2022-07-27T07:11:24.000Z","dependencies_parsed_at":"2022-08-27T01:40:43.735Z","dependency_job_id":null,"html_url":"https://github.com/vertexclique/cuneiform","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/vertexclique/cuneiform","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vertexclique%2Fcuneiform","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vertexclique%2Fcuneiform/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vertexclique%2Fcuneiform/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vertexclique%2Fcuneiform/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vertexclique","download_url":"https://codeload.github.com/vertexclique/cuneiform/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vertexclique%2Fcuneiform/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":260786808,"owners_count":23062999,"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":["cache-coherence","cache-optimization","concurrency","data-structures","rust-lang"],"created_at":"2024-08-02T09:01:27.727Z","updated_at":"2025-06-30T12:37:09.160Z","avatar_url":"https://github.com/vertexclique.png","language":"Rust","funding_links":[],"categories":["Rust"],"sub_categories":[],"readme":"\u003ch1 align=\"center\"\u003e\n    \u003cimg src=\"https://github.com/vertexclique/cuneiform/raw/master/img/cuneiform-logo.png\" width=\"200\" height=\"200\"/\u003e\n\u003c/h1\u003e\n\u003cdiv align=\"center\"\u003e\n \u003cstrong\u003e\n   In memory optimizations for Rust, revived from the slabs of Sumer.\n \u003c/strong\u003e\n\u003chr\u003e\n\n[![Build Status](https://github.com/vertexclique/cuneiform/workflows/CI/badge.svg)](https://github.com/vertexclique/cuneiform/actions)\n[![Latest Version](https://img.shields.io/crates/v/cuneiform.svg)](https://crates.io/crates/cuneiform)\n[![Rust Documentation](https://img.shields.io/badge/api-rustdoc-blue.svg)](https://docs.rs/cuneiform/)\n\u003c/div\u003e\n\nThis crate provides proc macro attributes to improve in memory data access times.\n\nCuneiform's main macro can take various arguments at attribute position:\n* `hermetic = true|false` (default is `true` when `#[cuneiform]`)\n    * Hermetic enables cuneiform to detect cache sizes from OSes which have API to fetch.\n    * Currently, hermetic argument works only Linux kernel 2.6.32 and above.\n    * If system is different than supported systems it falls back to `slab`s.\n* `slab = \"board_or_architecture_name` (e.g. `#[cuneiform(slab = \"powerpc_mpc8xx\")]`)\n    * Slabs are either embedded system boards or other specific architecture.\n    * Slab checking have two stages:\n        * First, it checks the given board/architecture if exist.\n        * If not slabs fall back to Rust supported architectures.\n        * Still architecture is not detected, it will fall back to default values.\n* `force = u8` (e.g. `#[cuneiform(force = 16)]`)\n    * Forces a given cache alignment. Overrides all other systems mentioned above.\n\n```toml\n[dependencies]\ncuneiform = \"0.1\"\n```\n\n## Examples\nBasic usage can be:\n```rust\n// Defaults to `hermetic = true`\n#[cuneiform]\npub struct Varying {\n    data: u8,\n    data_2: u16,\n}\n```\n\nTargeting specific architecture:\n```rust\n#[cuneiform(slab = \"powerpc_mpc8xx\")]\npub struct SlabBased {\n    data: u8,\n    data_2: u16,\n}\n```\n\nOverriding the default cache alignment:\n```rust\n#[cuneiform(force = 16)]\npub struct Forced {\n    data: u8,\n    data_2: u16,\n}\n```\n\n## Field level cache optimizations\nCheck out [cuneiform-fields](https://github.com/vertexclique/cuneiform-fields) for field level optimizations.\n\n## Design choices\n* Cuneiform doesn't have specific instruction or architecture specific code.\n* Works with crates like `#![no_std]`. Ease your pain for cache optimizations. With allocator you can compile on the board too.\n* Not based on assumptions. Based on Linux tree, OS checks, provider manuals and related documentation.\n\n## Before opening a PR\n* If it is big.LITTLE architecture, separate both parts in slabs. Apply the naming conventions.\n* Check existing slabs before opening a PR. Please update it when you add one.\n* If you come up with instructionless detection for hermetic alignment. Be sure that tests are included and not breaking existing platforms.\n\n## Existing Slabs\n\n* powerpc_mpc8xx\n* powerpc64bridge\n* powerpc_e500mc\n* power_7\n* power_8\n* power_9\n* exynos_big\n* exynos_LITTLE\n* krait\n* neoverse_n1\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvertexclique%2Fcuneiform","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvertexclique%2Fcuneiform","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvertexclique%2Fcuneiform/lists"}