Use swift-syntax to parse the slides manifest file #32
Description
The current manifest parser is using Swift compiler's --driver-mode=swift
to execute the manifest file (written in Swift) then dump the initialised TruffautSupport.Presentation
as JSON in stdout.
This method was initially inspired by Swift Package Manager's ManifestLoader.
While Swift Package Manager's ManifestLoader
was improved by making it sandboxed, Truffaut's manifest parser wasn't. This makes our current way of parsing both inefficient and insecure.
What's worse is that the way we distribute Truffaut.app
and the TruffautSupport
framework requires the framework and the running machine having the same version of the Swift compiler. This make it even harder to use.
Since now swift-syntax is available, we should move away from using the Swift compiler to execute the manifest file to parsing the manifest file literally.