{"id":28937189,"url":"https://github.com/flet-dev/dart-bridge","last_synced_at":"2026-06-16T21:00:46.495Z","repository":{"id":289156662,"uuid":"970302507","full_name":"flet-dev/dart-bridge","owner":"flet-dev","description":"Send data from Python to Dart via SendPort ","archived":false,"fork":false,"pushed_at":"2026-06-10T02:29:31.000Z","size":103,"stargazers_count":6,"open_issues_count":2,"forks_count":1,"subscribers_count":3,"default_branch":"main","last_synced_at":"2026-06-10T03:13:55.222Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/flet-dev.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-04-21T19:59:50.000Z","updated_at":"2026-06-10T02:29:33.000Z","dependencies_parsed_at":"2025-04-21T21:21:39.254Z","dependency_job_id":"661e95ba-845d-4577-bbe2-5a7474595b55","html_url":"https://github.com/flet-dev/dart-bridge","commit_stats":null,"previous_names":["flet-dev/dart-bridge"],"tags_count":9,"template":false,"template_full_name":null,"purl":"pkg:github/flet-dev/dart-bridge","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flet-dev%2Fdart-bridge","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flet-dev%2Fdart-bridge/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flet-dev%2Fdart-bridge/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flet-dev%2Fdart-bridge/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/flet-dev","download_url":"https://codeload.github.com/flet-dev/dart-bridge/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flet-dev%2Fdart-bridge/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34423220,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-16T02:00:06.860Z","response_time":126,"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":[],"created_at":"2025-06-22T21:04:08.622Z","updated_at":"2026-06-16T21:00:46.489Z","avatar_url":"https://github.com/flet-dev.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# dart-bridge\n\nIn-process Dart ↔ Python byte transport — the C library powering\n[`serious_python`](https://github.com/flet-dev/serious-python)'s Dart-to-Python\nFFI bridge and (transitively) [Flet](https://flet.dev)'s socket-free transport\non `flet build` outputs.\n\nThis repository **publishes pre-built native binaries** consumed by the\n`serious_python_*` Flutter plugins. End users don't typically interact with\nthis repo directly — they depend on `serious_python` (or `flet`) and get the\nbridge transparently.\n\n## What's in here\n\n- `src/dart_bridge.c` — single C source containing both the Dart-callable\n  surface (`DartBridge_InitDartApiDL`, `DartBridge_EnqueueMessage(port, ...)`)\n  and the Python built-in module (`PyInit_dart_bridge`,\n  `set_enqueue_handler_func(port, callable)`, `send_bytes(port, payload)`).\n  Statically linked together — no dlsym/dlopen plumbing needed because both\n  halves share the keyed handler list trivially. The 64-bit Dart native\n  port doubles as the channel key in both directions, so multiple\n  PythonBridge instances (UI channel + logging channel + ...) coexist\n  without colliding.\n- `src/serious_python_run.c` — Python lifecycle: `Py_Initialize`,\n  `PyRun_SimpleFile` / `PyRun_SimpleString`, env / sys.argv setup, worker-\n  thread execution. Lifted from the platform-specific implementations in\n  `serious_python_{darwin,linux,windows,android}`. Exposes\n  `serious_python_run(config)` (sync or async via Dart port),\n  `serious_python_register_extension(name, init)` (additional inittab\n  entries beyond dart_bridge), `serious_python_request_stop()`,\n  `serious_python_finalize()`.\n- `src/dart_api/` — Dart SDK headers (vendored from the Dart SDK).\n\n## Released binaries\n\nEvery tagged release attaches the following artifacts:\n\n| Platform | Artifact |\n|---|---|\n| Linux x86_64 | `libdart_bridge-linux-x86_64.so` |\n| Linux aarch64 | `libdart_bridge-linux-aarch64.so` |\n| Windows x86_64 (Release CRT) | `dart_bridge-windows-x86_64.dll` |\n| Windows x86_64 (Debug CRT) | `dart_bridge_d-windows-x86_64.dll` |\n| Android arm64-v8a / armeabi-v7a / x86_64 | `libdart_bridge-android-\u003cabi\u003e-py\u003cver\u003e.so` |\n| Apple (iOS device + iOS sim + macOS) | `dart_bridge-apple.xcframework.zip` |\n\nabi3 (`Py_LIMITED_API=0x030c0000`) makes one binary work for any CPython\n3.12+ on Linux/Windows/Apple. Android is the exception: python-build-\nstandalone ships `libpython3.so` as a GNU linker script that resolves to\n`libpython3.\u003cver\u003e.so`, so the resulting `DT_NEEDED` entry is version-\nspecific and we publish a binary per `(abi × python_version)`.\n\narmeabi-v7a is only published for Python 3.12 — CPython dropped 32-bit\nAndroid in 3.13+ (PEP 738).\n\nDownload URL pattern:\n\n```\nhttps://github.com/flet-dev/dart-bridge/releases/download/v\u003cver\u003e/\u003cartifact\u003e\n```\n\n## Local build\n\n```bash\n# Linux (uses system Python headers)\ncmake -B build -S . -DCMAKE_BUILD_TYPE=Release\ncmake --build build\n\n# Apple xcframework\n./apple/build_xcframework.sh\n```\n\nFor Windows / Android cross-builds, see `scripts/build_windows.ps1` and\n`scripts/build_android.sh` — they handle the toolchain setup CI uses.\n\n## Versioning\n\nPlain semver, decoupled from CPython. The bridge is abi3-stable across all\n3.12+ Pythons; one binary per (platform × arch) covers every supported\nruntime. `serious_python` pins to a specific dart-bridge version via its\nplugin build scripts.\n\n## License\n\nMIT — see [LICENSE](LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fflet-dev%2Fdart-bridge","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fflet-dev%2Fdart-bridge","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fflet-dev%2Fdart-bridge/lists"}