{"id":24653062,"url":"https://github.com/markmll/dynamod","last_synced_at":"2026-01-04T15:06:54.098Z","repository":{"id":273601929,"uuid":"920251601","full_name":"MarkMLl/dynamod","owner":"MarkMLl","description":"Dynamic-loading class, and program to wrap an Object Pascal .inc file for static and dynamic linkage.","archived":false,"fork":false,"pushed_at":"2025-01-29T08:26:23.000Z","size":48,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-29T09:30:58.923Z","etag":null,"topics":["converter","dynamic","library","loader"],"latest_commit_sha":null,"homepage":"","language":"Pascal","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/MarkMLl.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}},"created_at":"2025-01-21T20:28:38.000Z","updated_at":"2025-01-29T08:37:55.000Z","dependencies_parsed_at":"2025-01-21T22:19:21.397Z","dependency_job_id":"bcc3bd5f-5230-4119-92db-a9a238ee82cc","html_url":"https://github.com/MarkMLl/dynamod","commit_stats":null,"previous_names":["markmll/dynamod"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MarkMLl%2Fdynamod","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MarkMLl%2Fdynamod/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MarkMLl%2Fdynamod/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MarkMLl%2Fdynamod/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MarkMLl","download_url":"https://codeload.github.com/MarkMLl/dynamod/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244709056,"owners_count":20496997,"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":["converter","dynamic","library","loader"],"created_at":"2025-01-25T20:13:33.286Z","updated_at":"2026-01-04T15:06:54.001Z","avatar_url":"https://github.com/MarkMLl.png","language":"Pascal","funding_links":[],"categories":[],"sub_categories":[],"readme":"# dynamod\nDynamic-loading class, and program to wrap a .inc for load-at-startup and load-on-demand linkage.\n\nThis repository comprises two parts:\n\nThe first is the Dynamod unit, which is a thin wrapper around a dynamic library (.DLL on Windows, .so on unix) such that after being loaded into memory it is presented as an instantiated class with each entry point being a method.\n\nThe second is the defToSDUnits program, which takes a .inc file (typically the result of a run of h2pas or a similar conversion utility) and generates .static and .dynamic Pascal interface units for the at-load and on-demand cases respectively.\n\nThese are intended to be renamed manually such that e.g. something.inc generates something.static and something.dynamic, hence the library is wrapped by something.pas and something_dynamic.pas.\n\nAt runtime, an entrypoint godothis() in the library may be referred to as something.godothis() irrespective of whether the linkage is at-startup or on-demand: the only thing that needs to be changed is the name of the imported unit (something or something_dynamic). See the example in the demo directory.\n\nThe advantage of this approach is that a program relying on a library linked at-startup may be relatively easily debugged, while a program relying on a library linked on-demand can at the very least \"fail intelligently\" if the library is unavailable, and can in more sophisticated situations use a magic number to check the interface version or reload the library if it is changed (see https://github.com/MarkMLl/dsocat for an example).\n\nBecause the wrapper is kept thin and structured, if the units implementing the library are written in Pascal (rather than being a preexisting .so written in C etc.) they may be linked at build time making debugging (using the Lazarus IDE) relatively simple.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarkmll%2Fdynamod","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmarkmll%2Fdynamod","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarkmll%2Fdynamod/lists"}