Skip to content

How will YAML change as we add more languages? #289

Open
@liamappelbe

Description

@liamappelbe

We need to figure out how to adapt the YAML config as we add more languages (eg ObjC, Java, Swift, Kotlin).

For the input source files, for Java/Kotlin/Swift we can just look at the file extension, but ObjC also uses .h files. The easiest solution would just be to add an objc-headers key, at the same level as headers, and I think that would also make sense for the other languages.

The main issue I see is that most of the other top level config keys are either not applicable to some languages (eg structs/typedefs/unions/macros), or we'd want them separated by language (eg functions might have different naming conventions in different languages, so the regexes would look different).

Should we just add a bunch more top level keys, but with language specific prefixes? Eg objc-functions, java-classes? Or maybe we should totally restructure the format so that the language is at the top level:

ffigen:
  output:
  c:
    headers:
    functions:
    ...
  objc:
    headers:
    classes:
    ...

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions