{"id":13723327,"url":"https://github.com/okeuday/GEPD","last_synced_at":"2025-05-07T16:32:48.893Z","repository":{"id":518955,"uuid":"147145","full_name":"okeuday/GEPD","owner":"okeuday","description":"Generic Erlang Port [Driver]: Automatically generate an Erlang port driver or Erlang port for C/C++ bindings using a single self-contained file, and easily switch between either.","archived":false,"fork":false,"pushed_at":"2023-02-11T04:47:17.000Z","size":125,"stargazers_count":83,"open_issues_count":1,"forks_count":11,"subscribers_count":13,"default_branch":"master","last_synced_at":"2025-04-23T03:48:26.032Z","etag":null,"topics":["erlang","erlang-encoding","erlang-port","erlang-port-driver"],"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/okeuday.png","metadata":{"files":{"readme":"README.markdown","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}},"created_at":"2009-03-10T05:31:53.000Z","updated_at":"2024-10-08T15:07:39.000Z","dependencies_parsed_at":"2023-07-05T15:01:13.290Z","dependency_job_id":null,"html_url":"https://github.com/okeuday/GEPD","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/okeuday%2FGEPD","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/okeuday%2FGEPD/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/okeuday%2FGEPD/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/okeuday%2FGEPD/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/okeuday","download_url":"https://codeload.github.com/okeuday/GEPD/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252915527,"owners_count":21824585,"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":["erlang","erlang-encoding","erlang-port","erlang-port-driver"],"created_at":"2024-08-03T01:01:39.336Z","updated_at":"2025-05-07T16:32:43.863Z","avatar_url":"https://github.com/okeuday.png","language":"C++","funding_links":[],"categories":["Erlang Specific","TODO scan for Android support in followings"],"sub_categories":[],"readme":"# GENERIC ERLANG PORT \\[DRIVER\\] (GEP[D])\n\n## PURPOSE\n\nTo automatically generate an Erlang port driver or Erlang port\nfor C/C++ bindings using a single self-contained file.\n\n\nFiles:\n\n* `test_bindings.h` contains the ONLY configuration to support the C functions\n  (in `test_functions.h` and `test_functions.c`)\n* `test_bindings.erl` provides the `gen_server` to manage the port or\n  port driver\n* `erlang_functions_hrl.h` creates the erlang function interface\n* `port_driver.cpp` provides the Erlang port driver implementation\n* `port.cpp` and `port.hpp` provide the Erlang port implementation\n\nWhether `PORT_DRIVER_NAME_PREFIX` or `PORT_NAME_PREFIX` is defined determines\nif a port driver or port is built, respectively (in `test_bindings.h`).\nIf both are defined, both are built and the port driver is used within\n`test_bindings.erl` (undefine `ERL_PORT_DRIVER_NAME` if you want to use\nthe port).\n\n\nFeatures:\n\n* a function binding with only a single line tuple\n* efficient passing of function types with no intermediate character buffer\n* functionality like the Erlang Driver Tool Kit (EDTK) (no fd handling though)\n* macro expansion to avoid code duplication errors\n* floating point type handling\n* stdout/stderr handling in the generated port code\n\n\nCaveat:\n\n(This is no longer true for `Erlang \u003e= R15`)\nThe generated port driver code can not be used for hot code updating\nif it performs an asynchronous call because erts will lock the driver\n(making it \"permanent\") with `driver_lock_driver()`\n(`http://erlang.org/doc/man/erl_driver.html#driver_lock_driver`).\nWith the driver locked, there is no possibility that an async\noperation would create instability after a hot code update.\n\n\n## BUILDING\n\n`Erlang/OTP \u003e= R14A` is required.\nBoost is required for the preprocessor macro expansion code\n([http://www.boost.org/](http://www.boost.org/)).\n\nTo build, use:\n\n    ./autogen.sh\n    ./configure\n    make\n    make install\n\n## RUNNING\n\nThe `test_bindings` code should generate output similar to:\n\n    $ erl +A 16\n    1\u003e test_bindings:start().\n    using port driver\n    {ok,\u003c0.35.0\u003e}\n    2\u003e test_bindings:test().\n    sync sleep\n    async sleep\n    ...\n    stdout writing before 2 second sleep\n                                        ok\n    3\u003e stdout writing after 2 second sleep\n                                          stderr\n                                                line\n                                                    break(s)\n                                                            missasync function call returned: {ok,ok}\n    3\u003e \n\n\n## LICENSE\n\nMIT License\n\n\n## CONTACT\n\nMichael Truog \u003cmjtruog at protonmail dot com\u003e\n\n\n## THANKS\n\n* Matt Stancliff (GEPD CMake integration)\n* Scott Lystig Fritchie (EDTK, i.e., Erlang Driver Tool Kit)\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fokeuday%2FGEPD","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fokeuday%2FGEPD","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fokeuday%2FGEPD/lists"}