unflutter/dart/dart.h
2022-11-27 01:18:03 +03:00

35 lines
535 B
C++

//
// Created by selim on 21.11.22.
//
#ifndef UNFLUTTER_DART_H
#define UNFLUTTER_DART_H
#include <cstdint>
#include <array>
#include <string>
const uint32_t DART_MAGIC = 0xDCDCF5F5;
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<char8_t, 32> versionHash;
};
#pragma pack ()
std::string snapshotKindString(SnapshotKind kind);
#endif //UNFLUTTER_DART_H