// // Created by selim on 21.11.22. // #ifndef UNFLUTTER_DART_H #define UNFLUTTER_DART_H #include #include #include const uint32_t DART_MAGIC = 0xDCDCF5F5; const char* vmInstructions = "_kDartVmSnapshotInstructions"; const char* vmData = "_kDartVmSnapshotData"; const char* isolateInstructions = "_kDartIsolateSnapshotInstructions"; const char* isolateData = "_kDartIsolateSnapshotData"; const char* buildId = "_kDartSnapshotBuildId"; enum SnapshotKind: uint64_t { FULL, FULL_JIT, FULL_AOT, MESSAGE, NONE, INVALID }; #pragma pack (1) struct SnapshotHeader { uint32_t magic; int64_t size; SnapshotKind kind; std::array versionHash; }; #pragma pack () std::string snapshotKindString(SnapshotKind kind); #endif //UNFLUTTER_DART_H