{"id":30582884,"url":"https://github.com/nickscha/edp","last_synced_at":"2025-08-29T08:06:43.564Z","repository":{"id":312086226,"uuid":"1046249480","full_name":"nickscha/edp","owner":"nickscha","description":"C89, single header, nostdlib executable data packager","archived":false,"fork":false,"pushed_at":"2025-08-28T12:29:43.000Z","size":729,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-08-28T19:36:11.113Z","etag":null,"topics":["c89","executable-packaging","executable-packing","nostdlib","single-header"],"latest_commit_sha":null,"homepage":"","language":"C","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/nickscha.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2025-08-28T12:09:49.000Z","updated_at":"2025-08-28T12:29:47.000Z","dependencies_parsed_at":"2025-08-28T19:41:51.619Z","dependency_job_id":"acd67a41-049d-40bd-bf18-0c063a19cb04","html_url":"https://github.com/nickscha/edp","commit_stats":null,"previous_names":["nickscha/edp"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/nickscha/edp","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nickscha%2Fedp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nickscha%2Fedp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nickscha%2Fedp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nickscha%2Fedp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nickscha","download_url":"https://codeload.github.com/nickscha/edp/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nickscha%2Fedp/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":272652313,"owners_count":24970576,"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","status":"online","status_checked_at":"2025-08-29T02:00:10.610Z","response_time":87,"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":["c89","executable-packaging","executable-packing","nostdlib","single-header"],"created_at":"2025-08-29T08:06:41.727Z","updated_at":"2025-08-29T08:06:43.557Z","avatar_url":"https://github.com/nickscha.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# edp\nA C89 standard compliant, single header, nostdlib (no C Standard Library) Executable Data Packager (EDP).\n\n\u003cp align=\"center\"\u003e\n\u003ca href=\"https://github.com/nickscha/edp\"\u003e\u003cimg src=\"assets/edp.png\"\u003e\u003c/a\u003e\n\u003c/p\u003e\n\nFor more information please look at the \"edp.h\" file or take a look at the \"examples\" or \"tests\" folder.\n\n\u003e [!WARNING]\n\u003e THIS PROJECT IS A WORK IN PROGRESS! ANYTHING CAN CHANGE AT ANY MOMENT WITHOUT ANY NOTICE! USE THIS PROJECT AT YOUR OWN RISK!\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://github.com/nickscha/edp/releases\"\u003e\n    \u003cimg src=\"https://img.shields.io/github/v/release/nickscha/edp?style=flat-square\u0026color=blue\" alt=\"Latest Release\"\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://github.com/nickscha/edp/releases\"\u003e\n    \u003cimg src=\"https://img.shields.io/github/downloads/nickscha/edp/total?style=flat-square\u0026color=brightgreen\" alt=\"Downloads\"\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://opensource.org/licenses/MIT\"\u003e\n    \u003cimg src=\"https://img.shields.io/badge/License-MIT-yellow.svg?style=flat-square\" alt=\"License\"\u003e\n  \u003c/a\u003e\n  \u003cimg src=\"https://img.shields.io/badge/Standard-C89-orange?style=flat-square\" alt=\"C Standard\"\u003e\n  \u003cimg src=\"https://img.shields.io/badge/nolib-nostdlib-lightgrey?style=flat-square\" alt=\"nostdlib\"\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003cb\u003eEDP\u003c/b\u003e lets you \u003cb\u003eappend arbitrary data to an executable\u003c/b\u003e and \u003cb\u003eaccess it at runtime\u003c/b\u003e, \n  all without relying on the C Standard Library.\n\u003c/p\u003e\n\n## **Features**\n- **C89 compliant** — portable and legacy-friendly  \n- **Single-header API** — just include `edp.h`  \n- **nostdlib** — no dependency on the C Standard Library  \n- **Minimal binary size** — optimized for small executables  \n- **Cross-platform** — Windows, Linux, and more (WIP)  \n- **Strict compilation** — built with aggressive warnings \u0026 safety checks  \n\n### **1. Get EDP**\nClone the repository or download the standalone files:\n\n```bash\ngit clone https://github.com/nickscha/edp.git\n```\n\nThe project consists of two main components:\n\n| File       | Purpose |\n|-----------|----------------------|\n| **edp.c** | Standalone nostdlib appender — append arbitrary data to an executable |\n| **edp.h** | Loader API — read the appended data directly at runtime |\n\n---\n\n### **2. Building the Appender (`edp.c`)**\n\nThe appender is **freestanding** and **nostdlib**. Compile using **Clang** or **GCC** with strict flags:\n\n```bat\nset DEF_COMPILER_FLAGS=-mconsole -march=native -mtune=native -std=c89 -pedantic -nodefaultlibs -nostdlib -mno-stack-arg-probe -Xlinker /STACK:0x100000,0x100000 ^\n-fno-builtin -ffreestanding -fno-asynchronous-unwind-tables -fuse-ld=lld ^\n-Wall -Wextra -Werror -Wvla -Wconversion -Wdouble-promotion -Wsign-conversion -Wuninitialized -Winit-self ^\n-Wunused -Wunused-function -Wunused-macros -Wunused-parameter -Wunused-value -Wunused-variable -Wunused-local-typedefs\n\nset DEF_FLAGS_LINKER=-lkernel32\ncc -s -Os %DEF_COMPILER_FLAGS% edp.c -o edp.exe %DEF_FLAGS_LINKER%\n```\n\nOr download prebuilt binaries from  \n**[GitHub Actions → Latest Artifacts](https://github.com/nickscha/edp/actions)**.\n\n---\n\n### **3. Appending Data to an Executable**\n\nOnce compiled, append arbitrary data:\n\n```bash\nedp.exe my_program.exe my_payload.bin\n```\n\nThis appends `my_payload.bin` to the end of `my_program.exe`.  \nThe data can then be accessed at runtime using `edp.h`.\n\n---\n\n### **4. Loading Appended Data (`edp.h`)**\n\nHere’s how you load the embedded payload:\n\n```c\n#include \"edp.h\"  /* Executable Data Packager */\n\nint main(void) {\n    void *payload = 0;\n    unsigned int payload_size = 0;\n\n    if (!edp_data_load(\u0026payload, \u0026payload_size)) {\n        /* No data was appended */\n        return 1;\n    }\n\n    /* Use payload \u0026 payload_size here */\n\n    /* Free memory after use */\n    edp_data_free(payload);\n\n    return 0;\n}\n```\n\n---\n\n## **Motivation**\n\n**EDP** exists to give developers a **minimalistic, reliable, and portable** solution for:\n- Embedding configuration, assets, or metadata inside executables  \n- Accessing that data without external files  \n- Operating **without the C Standard Library**  \n\nThis approach is especially useful for:\n- Self-contained tools  \n- Licensing \u0026 authentication systems  \n- Bootloaders \u0026 embedded systems  \n- Portable cross-platform executables  \n- Assets\n\n---\n\n## \"nostdlib\" Motivation \u0026 Purpose\n\nnostdlib is a lightweight, minimalistic approach to C development that removes dependencies on the standard library. The motivation behind this project is to provide developers with greater control over their code by eliminating unnecessary overhead, reducing binary size, and enabling deployment in resource-constrained environments.\n\nMany modern development environments rely heavily on the standard library, which, while convenient, introduces unnecessary bloat, security risks, and unpredictable dependencies. nostdlib aims to give developers fine-grained control over memory management, execution flow, and system calls by working directly with the underlying platform.\n\n### Benefits\n\n#### Minimal overhead\nBy removing the standard library, nostdlib significantly reduces runtime overhead, allowing for faster execution and smaller binary sizes.\n\n#### Increased security\nStandard libraries often include unnecessary functions that increase the attack surface of an application. nostdlib mitigates security risks by removing unused and potentially vulnerable components.\n\n#### Reduced binary size\nWithout linking to the standard library, binaries are smaller, making them ideal for embedded systems, bootloaders, and operating systems where storage is limited.\n\n#### Enhanced performance\nDirect control over system calls and memory management leads to performance gains by eliminating abstraction layers imposed by standard libraries.\n\n#### Better portability\nBy relying only on fundamental system interfaces, nostdlib allows for easier porting across different platforms without worrying about standard library availability.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnickscha%2Fedp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnickscha%2Fedp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnickscha%2Fedp/lists"}