{"id":26261874,"url":"https://github.com/ryanprw/dart-snapshot","last_synced_at":"2026-05-19T08:33:24.979Z","repository":{"id":281223436,"uuid":"944607760","full_name":"Ryanprw/Dart-Snapshot","owner":"Ryanprw","description":"example of using the snapshot with spawn isolate","archived":false,"fork":false,"pushed_at":"2025-03-07T17:33:05.000Z","size":0,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-07T17:35:05.529Z","etag":null,"topics":["dart","snaps"],"latest_commit_sha":null,"homepage":"","language":"Dart","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/Ryanprw.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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":"2025-03-07T16:42:29.000Z","updated_at":"2025-03-07T17:34:06.000Z","dependencies_parsed_at":"2025-03-07T17:46:50.080Z","dependency_job_id":null,"html_url":"https://github.com/Ryanprw/Dart-Snapshot","commit_stats":null,"previous_names":["ryanprw/dart-snapshot"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ryanprw%2FDart-Snapshot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ryanprw%2FDart-Snapshot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ryanprw%2FDart-Snapshot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ryanprw%2FDart-Snapshot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Ryanprw","download_url":"https://codeload.github.com/Ryanprw/Dart-Snapshot/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243500787,"owners_count":20300775,"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":["dart","snaps"],"created_at":"2025-03-14T00:16:29.061Z","updated_at":"2025-12-28T09:14:28.928Z","avatar_url":"https://github.com/Ryanprw.png","language":"Dart","funding_links":[],"categories":[],"sub_categories":[],"readme":"# An example of using the snapshot with spawn isolate\n\n## Primary\n\n``dart compile exe bin/primary.dart -o primary.exe``\n\n``./primary.exe``\n\nbin/primary.dart\n\n```dart\nimport 'dart:io' as io;\nimport 'dart:isolate';\n\nimport 'package:path/path.dart' as path;\n\nvoid main(List\u003cString\u003e arguments) =\u003e Future\u003cvoid\u003e(() async {\n      print('primary start');\n      final uri =\n          Uri.parse(path.join(io.Directory.current.path, 'secondary.aot'));\n      final isolate = await Isolate.spawnUri(\n        uri,\n        arguments,\n        null,\n        debugName: 'secondary',\n      );\n      await Future.delayed(const Duration(seconds: 3));\n      isolate.kill();\n      print('primary end');\n    });\n```\n\n## Secondary\n\n``dart compile aot-snapshot bin/secondary.dart -o secondary.aot``\n\nbin/secondary.dart\n\n```dart\nimport 'dart:developer' as dev;\n\nvoid main(List\u003cString\u003e? arguments, Object? message) {\n  final message = 'Hello, I am secondary';\n  print(message);\n  dev.log(message);\n}\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fryanprw%2Fdart-snapshot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fryanprw%2Fdart-snapshot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fryanprw%2Fdart-snapshot/lists"}