Move pure data types out of Luma/ into Sources/LumaCore/ so they can be shared with the GTK frontend: - AddressAnchor, CFGGraph, ITraceDecoder (+ all related types: TraceEntry, ITraceMetadata, RegisterState, etc.) - JSInspectValue, SpawnConfig, ProcessModule - HookPackConfig, HookPackManifest, InstrumentConfigCodec - InstrumentIcon, InstrumentKind, ConsoleLevel CFGGraph uses its own Point2D instead of CoreGraphics types, keeping the core free of Apple frameworks. Remove premature stubs (Engine, ProcessNode, InstrumentRuntime, EventStream) that will be properly built in a later phase once the real implementations are ready to move.
12 lines
321 B
Swift
12 lines
321 B
Swift
import Foundation
|
|
|
|
public enum InstrumentConfigCodec {
|
|
public static func encode<T: Codable>(_ value: T) throws -> Data {
|
|
try JSONEncoder().encode(value)
|
|
}
|
|
|
|
public static func decode<T: Codable>(_ type: T.Type, from data: Data) throws -> T {
|
|
try JSONDecoder().decode(type, from: data)
|
|
}
|
|
}
|