{"id":20146230,"url":"https://github.com/mohammadrezaamani/bridge","last_synced_at":"2026-04-16T05:04:34.360Z","repository":{"id":229726207,"uuid":"777491340","full_name":"MohammadrezaAmani/bridge","owner":"MohammadrezaAmani","description":" This Universal Shared Memory Bridge enables communication between processes across different programming languages by providing a shared memory interface, facilitating efficient data exchange.","archived":false,"fork":false,"pushed_at":"2024-03-26T00:59:56.000Z","size":2766,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-03T00:15:06.235Z","etag":null,"topics":["bridge","c","js","python","shared-memory"],"latest_commit_sha":null,"homepage":"","language":"Python","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/MohammadrezaAmani.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}},"created_at":"2024-03-26T00:17:32.000Z","updated_at":"2025-02-17T14:25:30.000Z","dependencies_parsed_at":"2024-06-20T11:46:42.008Z","dependency_job_id":null,"html_url":"https://github.com/MohammadrezaAmani/bridge","commit_stats":null,"previous_names":["mohammadrezaamani/bridge"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/MohammadrezaAmani/bridge","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MohammadrezaAmani%2Fbridge","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MohammadrezaAmani%2Fbridge/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MohammadrezaAmani%2Fbridge/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MohammadrezaAmani%2Fbridge/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MohammadrezaAmani","download_url":"https://codeload.github.com/MohammadrezaAmani/bridge/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MohammadrezaAmani%2Fbridge/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31872036,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-15T15:24:51.572Z","status":"online","status_checked_at":"2026-04-16T02:00:06.042Z","response_time":69,"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":["bridge","c","js","python","shared-memory"],"created_at":"2024-11-13T22:20:36.813Z","updated_at":"2026-04-16T05:04:34.330Z","avatar_url":"https://github.com/MohammadrezaAmani.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Universal Shared Memory Bridge\n\n\\[Under Development\\!\\]\n\n## Overview\n\nThis project demonstrates how to establish communication between different programming languages using shared memory. Shared memory provides a mechanism for inter-process communication (IPC) by allowing multiple processes, regardless of the programming language they are written in, to share a region of memory, enabling efficient data exchange between them.\n\n## Components\n\n1. **Shared Memory Library (`shared_memory`)**:\n\n   - Provides functions to create shared memory, write data to shared memory, and read data from shared memory.\n   - Implemented in a language-agnostic manner to be usable by different programming languages.\n   - Exposes a simple API for interacting with shared memory.\n\n2. **Language-Specific Bindings**:\n\n   - For each programming language, create language-specific bindings to the shared memory library.\n   - These bindings provide an interface for the programming language to call the shared memory functions.\n\n3. **Shared Library / Dynamic Link Library (DLL)**:\n   - Contains the core functionality for creating, writing to, and reading from shared memory.\n   - Implemented using a language that supports low-level memory manipulation, such as C or C++.\n\n## Usage\n\n1. **Compilation**:\n\n   - Compile the shared library source code (`shared_memory.c` or `shared_memory.cpp`) to generate the shared library or DLL.\n\n   ```bash\n   gcc -shared -fPIC -o shared_memory.so shared_memory.c\n   ```\n\n   - Ensure that the shared library/DLL is accessible to all programming languages that will use it.\n\n2. **Language-Specific Usage**:\n\n   - Import or include the language-specific bindings in your code.\n   - Use the provided functions in the bindings to interact with shared memory, create, write to, and read from shared memory.\n\n3. **Data Exchange**:\n   - Use the shared memory functions to exchange data between processes written in different programming languages.\n   - Data written to shared memory by one process can be read by another process, regardless of the language they are written in.\n\n## Example\n\nAn example usage scenario is provided where a Python script produces data at regular intervals, writes it to shared memory. Then, a Node.js script consumes the data from shared memory and logs it. Similarly, a C++ program can read the data from shared memory and perform some processing on it.\n\n## Dependencies\n\n- For the shared library:\n  - A language that supports low-level memory manipulation (e.g., C or C++)\n- For language-specific bindings:\n  - Libraries or tools for generating bindings (e.g., `ctypes` for Python, `ffi-napi` for Node.js)\n- For each programming language:\n  - Language-specific dependencies for calling external functions and interacting with shared memory\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmohammadrezaamani%2Fbridge","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmohammadrezaamani%2Fbridge","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmohammadrezaamani%2Fbridge/lists"}