Obsidian icon indicating copy to clipboard operation
Obsidian copied to clipboard

Parse assets with source generator

Open Seb-stian opened this issue 3 years ago • 0 comments

Currently we load assets at runtime upon server start. This could be changed so that assets are parsed at compile time and injected into code with a source generator. Startup would be faster and assets wouldn't be included in the build.

I've already tried to implement this, but there is an issue where System.Text.Json is not found during compilation. There may be a workaround of having the dll compiled and referenced directly in the project. Another consideration is using Newtonsoft.Json, even though I tried to move away from it in favor of System.Text.Json. However since it'd be used at compilation time, it wouldn't be a big problem.

Since I already have some experience with source generation, I will assign myself.

Seb-stian avatar Apr 22 '21 15:04 Seb-stian