{"id":28420606,"url":"https://github.com/snxd/interop-simple","last_synced_at":"2026-05-01T06:02:43.509Z","repository":{"id":37945016,"uuid":"477787714","full_name":"snxd/interop-simple","owner":"snxd","description":"Example DIRECT interop that shows how to create a simple javascript object.","archived":false,"fork":false,"pushed_at":"2026-04-24T22:10:31.000Z","size":308,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":4,"default_branch":"dev","last_synced_at":"2026-04-25T00:36:15.874Z","etag":null,"topics":["client","direct","interop"],"latest_commit_sha":null,"homepage":"https://solidstatenetworks.com","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/snxd.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2022-04-04T16:40:36.000Z","updated_at":"2026-04-24T22:10:32.000Z","dependencies_parsed_at":"2023-02-19T13:00:50.099Z","dependency_job_id":"e1cb0211-83cf-4c05-b5a5-2ec9888e06c4","html_url":"https://github.com/snxd/interop-simple","commit_stats":null,"previous_names":[],"tags_count":267,"template":false,"template_full_name":null,"purl":"pkg:github/snxd/interop-simple","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/snxd%2Finterop-simple","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/snxd%2Finterop-simple/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/snxd%2Finterop-simple/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/snxd%2Finterop-simple/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/snxd","download_url":"https://codeload.github.com/snxd/interop-simple/tar.gz/refs/heads/dev","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/snxd%2Finterop-simple/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32361478,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-27T20:07:02.737Z","status":"ssl_error","status_checked_at":"2026-04-27T20:07:00.910Z","response_time":128,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["client","direct","interop"],"created_at":"2025-06-05T03:48:50.642Z","updated_at":"2026-04-28T01:05:46.435Z","avatar_url":"https://github.com/snxd.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Simple Interop Example for DIRECT 7.2\n\nThis is an example interop that shows how to run native code using a simple JavaScript object.\n\n\u003e **Note**\n\u003e Please use the branch corresponding to your version of DIRECT.\n\n### Contents\n\n* js/Simple.js - JavaScript class\n* js/SimpleExample.js - JavaScript example\n* lib/interop - DIRECT interop interface\n* mac - macOS specific files\n* linux - Linux specific files\n* windows - Windows specific files\n\n### Requirements\n\n* CMake 3.15\n\n### Build Instructions\n\nFetch submodules using Git:\n\n```bash\ngit submodule update --init\n```\n\nCMake is a makefile generator that produces solutions and project files for various compiler toolkits. To generate the solution files for your environment and to build the project:\n\n```bash\ncmake -S . -B build\ncmake --build build --config Debug\n```\n\nThe target architecture of the shared library must match the architecture of the DIRECT client you are using. For example, if you are using host.exe for 32-bit Windows, then you must configure for x86 by using CMake argument `-A Win32`. If configuring on Windows, it is recommended that you statically link against MSVC runtime using `-D CMAKE_MSVC_RUNTIME_LIBRARY=MultiThreaded` to prevent the user from having to install the Visual C++ runtime separately. To build on macOS, using Xcode, supply the `-G Xcode` argument.\n\n### Setup Instructions\n\nFirst copy the shared library to the directory where you intended to load it from. In our steps below we use the same directory as the client's executable: `{moduleAppDirectory}`.\n\n### JavaScript Integration\n\nIf you intend to use the interop with-in JavaScript use the following steps:\n\n1. Copy `Simple.js` and `SimpleExample.js` from the `js` directory to a directory in your skin called `src/interop`.\n2. Load the example code and interop in `/src/App.jsx` using `app.loadInterop`:\n    ```js\n    import \"./interop/SimpleExample.js\";\n\n    const simplePath = app.expandString(\"{moduleAppDirectory}{libraryPrefix}simple.{libraryExtension}\");\n    app.loadInterop(\"simple\", simplePath);\n    ```\n3. Call `app.unloadInterop` before `skinWindow.close()` in `src/App.jsx`:\n    ```js\n    app.unloadInterop(\"simple\", simplePath);\n    ``` \n3. Run `host` application with `--devtools --disablesecurity` (during production if you sign the dll you won't need this).\n4. If it integrated properly, you will see the following lines in console window. \u003cbr/\u003e\u003cimg src=\"screenshots/console.png\"\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsnxd%2Finterop-simple","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsnxd%2Finterop-simple","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsnxd%2Finterop-simple/lists"}