{"id":23091732,"url":"https://github.com/sqlite-mpi/sqlite-mpi-rust","last_synced_at":"2025-04-03T18:20:12.176Z","repository":{"id":101556678,"uuid":"265680740","full_name":"sqlite-mpi/sqlite-mpi-rust","owner":"sqlite-mpi","description":"Allows using SQLite via a JSON based IPC for processes that cannot embed a FFI.","archived":false,"fork":false,"pushed_at":"2020-05-20T21:38:39.000Z","size":4606,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-09T06:41:21.406Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://sqlitempi.com","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/sqlite-mpi.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":"2020-05-20T20:37:13.000Z","updated_at":"2020-05-20T21:38:41.000Z","dependencies_parsed_at":"2023-06-05T15:30:19.507Z","dependency_job_id":null,"html_url":"https://github.com/sqlite-mpi/sqlite-mpi-rust","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sqlite-mpi%2Fsqlite-mpi-rust","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sqlite-mpi%2Fsqlite-mpi-rust/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sqlite-mpi%2Fsqlite-mpi-rust/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sqlite-mpi%2Fsqlite-mpi-rust/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sqlite-mpi","download_url":"https://codeload.github.com/sqlite-mpi/sqlite-mpi-rust/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247052617,"owners_count":20875685,"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":[],"created_at":"2024-12-16T21:19:26.756Z","updated_at":"2025-04-03T18:20:12.169Z","avatar_url":"https://github.com/sqlite-mpi.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# SMPI - SQLite Message Passing Interface\n\n- This is a Rust based project that allows using SQLite from processes that cannot embed a C FFI.\n    - E.g. a JS VM that can only send and receive messages using HTTP `fetch`.\n\n- It wraps SQLites FFI and exports its own FFI.\n    - Instead of the 100's of functions in SQLite, it exports a few functions that allow passing JSON messages that represent SQL queries.\n    - Because JSON is serializable, these messages can pass over process and network boundaries.\n        - This is not true of the SQLite FFI as it uses C pointers which ties usage to a single OS process.\n    - Rust is used to cross compile a single program to many architectures.\n        - This allows the same behavior over many different platforms.\n\n- Its designed to be used in React Native mobile apps.\n    - RN apps have a single JS code base that interacts with two host runtimes (iOS, Android) via message passing.\n    - This Rust project has no specific RN code and is general enough to be used in other projects.\n\nSee https://sqlitempi.com/ for details.\n\n# Rust workspace/packages:\nRust workspaces are used to separate layers:\n\n- `sqliteffi`\n    - Converts SQLites FFI into a Rust API.\n- `sma`\n    - \"State Machine A\"\n    - Provides a more restricted API to `sqliteffi`.\n        - E.g.\n            - WAL mode is forced.\n            - Ownership is used to prevent multiple conflicting transactions starting on the same DB connection handle.\n            - Reads are concurrent, writes queue.\n    - Its still completely synchronous - no threading, promises or runtime.\n- `runtime`\n    - Uses the `sma` and provides a thread based runtime.\n    - Message passing is asynchronous.\n        - After the message is passed to the background thread the function returns to the caller.\n        - Once the message is processed by the background thread and has a reply, a callback notifies the original caller.\n- `smpi_iop_ffi`\n    - Uses `runtime` to wrap the API in various FFI standards.\n    - Compiles binaries that export FFI for various platforms:\n        - Android\n        - iOS\n        - Node.js\n    - See `smpi_iop_ffi/sh/*`\n    \n    \nEach package has tests; run `cargo test` from the package directory.\n\n### Contact\n\nContact me for any reason emadda.dev@gmail.com.\n\nCopyright © 2019 Enzo \u003cemadda.dev@gmail.com\u003e","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsqlite-mpi%2Fsqlite-mpi-rust","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsqlite-mpi%2Fsqlite-mpi-rust","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsqlite-mpi%2Fsqlite-mpi-rust/lists"}