Skip to content

Native AOT support #88

@aligin

Description

@aligin

Hi, I ran into a problem when using the library with NativeAot enabled. Everything is fine as long as I try to save or load the database from a file. This is because System.Text.Json.Serialize is used without a source generator. When I try await _db.SaveToFileAsync(_filePath); I see an error: 'Reflection-based serialization has been disabled for this application. Either use the source generator APIs or explicitly configure the 'JsonSerializerOptions.TypeInfoResolver' property.'
Is it possible to implement persistence using a source generator to support NativeAot? It would increase load and save speed, and decrease memory consumption.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions