antoniusnaumann / cargo-swift

A cargo plugin to easily build Swift packages from Rust code
https://crates.io/crates/cargo-swift
Apache License 2.0
180 stars 22 forks source link

Use askama templates #32

Closed antoniusnaumann closed 1 year ago

antoniusnaumann commented 1 year ago

If more flags are introduced to cargo swift init in the future, the current approach (separate template files for flags such as plain) would not allow to combine multiple unrelated flags, e.g. --plain --macro to init a project without boilerplate that only uses UniFFI proc-macros.

To make this feasible, a templating library such as askama should be used that allows including blocks conditionally.