{"id":23773012,"url":"https://github.com/esotuvaka/memetic","last_synced_at":"2026-04-11T07:42:50.583Z","repository":{"id":269411008,"uuid":"907287368","full_name":"esotuvaka/memetic","owner":"esotuvaka","description":"Memetic is a CLI tool for memory layout analysis across multiple compiled languages. It can recursively search your directories for structs and suggest more optimal memory layouts. Useful for memory constrained deployments, high-performance apps, embedded programming, FFI interoperability, etc.","archived":false,"fork":false,"pushed_at":"2025-01-12T19:49:11.000Z","size":30,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-02T06:34:43.933Z","etag":null,"topics":["c","cli","cpp","embedded-systems","ffi","go","memory-analyzer","rust","struct"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/esotuvaka.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE-MIT","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,"zenodo":null}},"created_at":"2024-12-23T08:48:37.000Z","updated_at":"2025-02-16T05:41:12.000Z","dependencies_parsed_at":"2024-12-23T11:34:35.790Z","dependency_job_id":"83a3a031-4226-48dc-980d-b14de2c08f32","html_url":"https://github.com/esotuvaka/memetic","commit_stats":null,"previous_names":["esotuvaka/structize","esotuvaka/memetic"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/esotuvaka/memetic","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/esotuvaka%2Fmemetic","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/esotuvaka%2Fmemetic/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/esotuvaka%2Fmemetic/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/esotuvaka%2Fmemetic/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/esotuvaka","download_url":"https://codeload.github.com/esotuvaka/memetic/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/esotuvaka%2Fmemetic/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31673067,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-10T17:19:37.612Z","status":"online","status_checked_at":"2026-04-11T02:00:05.776Z","response_time":54,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["c","cli","cpp","embedded-systems","ffi","go","memory-analyzer","rust","struct"],"created_at":"2025-01-01T05:21:56.136Z","updated_at":"2026-04-11T07:42:50.556Z","avatar_url":"https://github.com/esotuvaka.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Memetic\n\nMemetic is a Rust CLI tool designed to read source code files, find the structs, analyze their memory layout, and suggest optimizations for a more optimal memory footprint. It provides a formatted output or a git diff to show the suggested changes.\n\n## Features\n\n-   **Recursive File Search**: Search for source code files starting from the directory the CLI is called in.\n-   **Struct Analysis**: Identify and analyze the memory layout of structs in the source code.\n-   **Optimization Suggestions**: Suggest a more optimal memory footprint for the structs, if any.\n-   **Formatted Output**: Display the optimized memory layout in a readable format.\n-   **Git Diff**: Show the suggested changes as a git diff.\n\n## Installation\n\nNOTE: Currently no full release yet, so will have to be built from source.\n\nTo install `memetic`, you need to have Rust and Cargo installed. Then, you can build the project using Cargo:\n\n```sh\ncargo build --release\n```\n\n## Usage\n\nRun `memetic` with the following command:\n\n```sh\nmemetic [OPTIONS]\n```\n\n### Options\n\n-   -m mode: (E)xecute, (S)uggest, (D)iff using Git\n\n-   -o override: Pass a json object that overrides defaults. e.g: {\"type\": \"u32\", \"nat_align\": 5, \"size\": 8}\n\n-   -i includes: operate on files matching a comma separated list of regex patterns, instead of recursively\n\n-   -e excludes: exclude files matching a comma separated list of regex patterns from recursive search\n\n-   -d directory: operate from some starting directory, given some relative path to it. e.g: \"./src\"\n\n## Examples\n\nTo analyze all files in the current directory and suggest optimizations:\n\n```sh\nmemetic -a -m suggest\n```\n\nTo auto implement changes over a nested directory, excluding 2 files:\n\n```sh\nmemetic -m execute -d ./src/routers -e users.rs,messages.rs # note the lack of space between files\n```\n\n## Contributing\n\nContributions are welcome! Please open an issue or submit a pull request on GitHub.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fesotuvaka%2Fmemetic","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fesotuvaka%2Fmemetic","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fesotuvaka%2Fmemetic/lists"}