{"id":29566328,"url":"https://github.com/avicted/c_plugin_arch","last_synced_at":"2025-08-30T10:39:38.997Z","repository":{"id":295839116,"uuid":"991369344","full_name":"Avicted/c_plugin_arch","owner":"Avicted","description":"This is a proof of concept for a plugin architecture in C, demonstrating how to dynamically load and manage plugins. Each plugin can be loaded, initialized, run, and cleaned up, allowing for modular and extensible applications.","archived":false,"fork":false,"pushed_at":"2025-05-28T18:23:19.000Z","size":43,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-07-19T01:13:12.000Z","etag":null,"topics":["c","dll","plugins","shared-library"],"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/Avicted.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-05-27T14:17:34.000Z","updated_at":"2025-05-28T18:23:22.000Z","dependencies_parsed_at":"2025-05-27T16:44:18.423Z","dependency_job_id":"48fc63d4-b046-47b3-a889-b0b62ef14e23","html_url":"https://github.com/Avicted/c_plugin_arch","commit_stats":null,"previous_names":["avicted/c_plugin_arch"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Avicted/c_plugin_arch","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Avicted%2Fc_plugin_arch","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Avicted%2Fc_plugin_arch/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Avicted%2Fc_plugin_arch/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Avicted%2Fc_plugin_arch/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Avicted","download_url":"https://codeload.github.com/Avicted/c_plugin_arch/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Avicted%2Fc_plugin_arch/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":272839652,"owners_count":25001861,"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-30T02:00:09.474Z","response_time":77,"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","dll","plugins","shared-library"],"created_at":"2025-07-18T22:11:49.067Z","updated_at":"2025-08-30T10:39:38.966Z","avatar_url":"https://github.com/Avicted.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# C plugin architecture POC\n\nThis is a proof of concept for a plugin architecture in C using POSIX-specific features, demonstrating how to dynamically load and manage plugins.\nEach plugin can be loaded, initialized, run, and cleaned up, allowing for modular and extensible applications.\n\nThe plugins perform simulated work. They run in parallel by forking a process for each plugin, simulating a real-world scenario where plugins might perform tasks concurrently.\n\nCTRL+C to stop the execution through the signal handler. The signal handler ensures that all plugins are cleaned up properly before exiting.\n\n### Notes\nTo be able to handle signals properly the main program needs to be run in a terminal that supports signals (like a Linux terminal). If you run it in an IDE or a non-terminal environment, the signal handling might not work as expected and the program will not execute.\n\n### Build and Run\n```bash\nchmod +x build.sh\n./build.sh\n\n./build/c_plugin_arch_main\n```\n\n### Output\n```bash\nFound 2 plugins:\n  - plugin_1\n  - plugin_2\n\nLoading plugins...\n\tTest Plugin 1 initialized\n\tSuccessfully initialized plugin: Test Plugin 1 (initialized).\n\tTest Plugin 2 initialized\n\tSuccessfully initialized plugin: Test Plugin 2 (initialized).\n\nRunning plugins...\n[parent] Forked child 5296 for plugin Test Plugin 1\n[parent] Forked child 5297 for plugin Test Plugin 2\n\tTest Plugin 1 running\n\tTest Plugin 2 running\n\tTest Plugin 2 working... 1\n\tTest Plugin 1 working... 1\n\tTest Plugin 2 working... 2\n\tTest Plugin 1 working... 2\n\tTest Plugin 2 working... 3\n\tTest Plugin 1 working... 3\n\tTest Plugin 2 working... 4\n\tTest Plugin 1 working... 4\n\tTest Plugin 2 working... 5\n\tTest Plugin 1 working... 5\n\tTest Plugin 2 working... 6\n\tTest Plugin 1 working... 6\n\tTest Plugin 1 working... 7\n\tTest Plugin 2 working... 7\n\tTest Plugin 2 working... 8\n\tTest Plugin 1 working... 8\n\tTest Plugin 2 working... 9\n\tTest Plugin 1 working... 9\n\tTest Plugin 2 working... 10\n\tTest Plugin 1 working... 10\n\tSuccessfully ran plugin: Test Plugin 2 (ran to completion).\n\tSuccessfully ran plugin: Test Plugin 1 (ran to completion).\n\tPlugin plugin_1 finished running\n\tPlugin plugin_2 finished running\n\nCleaning up plugins...\n\tTest Plugin 1 cleaned up\n\tSuccessfully cleanup plugin: Test Plugin 1 (terminated).\n\tTest Plugin 2 cleaned up\n\tSuccessfully cleanup plugin: Test Plugin 2 (terminated).\n```\n\n### License\nMIT License\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Favicted%2Fc_plugin_arch","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Favicted%2Fc_plugin_arch","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Favicted%2Fc_plugin_arch/lists"}