{"id":25275897,"url":"https://github.com/davphla/minilibc","last_synced_at":"2025-06-11T23:34:17.474Z","repository":{"id":264349172,"uuid":"891465658","full_name":"Davphla/Minilibc","owner":"Davphla","description":"Lightweight C library that aims to recreate essential string and memory manipulation functions from the standard C library in assembly","archived":false,"fork":false,"pushed_at":"2025-01-26T22:58:48.000Z","size":48,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-12T15:48:28.648Z","etag":null,"topics":["asm","c","makefile","nasm"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Davphla.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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-20T11:39:23.000Z","updated_at":"2025-01-26T22:58:52.000Z","dependencies_parsed_at":"2025-01-26T23:32:36.771Z","dependency_job_id":null,"html_url":"https://github.com/Davphla/Minilibc","commit_stats":null,"previous_names":["davphla/minilibc"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Davphla%2FMinilibc","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Davphla%2FMinilibc/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Davphla%2FMinilibc/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Davphla%2FMinilibc/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Davphla","download_url":"https://codeload.github.com/Davphla/Minilibc/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247464223,"owners_count":20942970,"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":["asm","c","makefile","nasm"],"created_at":"2025-02-12T15:36:44.906Z","updated_at":"2025-04-06T10:18:25.435Z","avatar_url":"https://github.com/Davphla.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"  ```\n  __  __ _       _ _ _ _          \n |  \\/  (_)     (_) (_) |         \n | \\  / |_ _ __  _| |_| |__   ___ \n | |\\/| | | '_ \\| | | | '_ \\ / __|\n | |  | | | | | | | | | |_) | (__ \n |_|  |_|_|_| |_|_|_|_|_.__/ \\___|\n```\n                                  \n# Minilibc\n\nMinilibc is a lightweight C library designed to reimplement key string and memory manipulation functions from the standard C library using **assembly language**.\n\n---\n\n## Features\n\nThe following functions are fully implemented in assembly:\n\n- **String Manipulation**\n  - `strlen` :white_check_mark: — Calculate the length of a string.\n  - `strchr` :white_check_mark: — Locate the first occurrence of a character in a string.\n  - `strcmp` :white_check_mark: — Compare two strings.\n  - `strncmp` :white_check_mark: — Compare two strings up to a specified length.\n  - `strcasecmp` :white_check_mark: — Compare two strings ignoring case.\n  - `strstr` :white_check_mark: — Locate a substring within a string.\n  - `strpbrk` :white_check_mark: — Find the first occurrence of any character from a set.\n  - `strcspn` :white_check_mark: — Determine the length of a segment not containing specified characters.\n\n- **Memory Manipulation**\n  - `memset` :white_check_mark: — Set a block of memory to a specific value.\n  - `memmove` :white_check_mark: — Safely copy memory areas that may overlap.\n\n---\n\n## Why Minilibc?\n\n- **Lightweight**: Focused on essential functionality without the overhead of a full standard library.\n- **Educational**: Ideal for learning about low-level programming and assembly language techniques.\n\n---\n\n## Installation\n\n1. **Clone the Repository**:\n   ```bash\n   git clone https://github.com/yourusername/minilibc.git\n   cd minilibc\n   ```\n\n2. **Build the Library**:\n   Ensure you have an appropriate assembler and compiler toolchain installed.\n   ```bash\n   make\n   ```\n\n3. **Include Minilibc in Your Project**:\n   Link the `libasm.a` archive with your application during the build process:\n   ```bash\n   gcc -o your_program your_program.c -L. -lasm\n   ```\n\n---\n\n## Usage\n\nInclude the relevant headers in your C code, then call the functions as you would with the standard library:\n```c\n#include \"minilibc.h\"\n\nint main() {\n    char str[] = \"Hello, world!\";\n    size_t len = strlen(str);\n    printf(\"Length: %zu\\n\", len);\n    return 0;\n}\n```\n\n---\n\n## Roadmap\n\n### Completed\n- Core functions implemented:\n  - `strlen`, `strchr`, `memset`, `strcmp`, `memmove`, `strncmp`, `strcasecmp`, `strstr`, `strpbrk`, `strcspn`.\n\n### TODO\n- **Add Unit Testing**: Implement testing using [Unity](https://www.throwtheswitch.org/unity) to ensure function correctness.\n- **Release Library on GitHub**: Provide pre-built binaries and documentation.\n- **Add SIMD Optimization**: Extend functionality with `libsimd` for enhanced performance.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdavphla%2Fminilibc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdavphla%2Fminilibc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdavphla%2Fminilibc/lists"}