flipper-io / flipper

Flipper is a development platform that can be controlled from any programming language.
https://www.flipper.io/
Apache License 2.0
70 stars 15 forks source link

Standardize a way to organize language bindings written for drivers. #31

Closed georgemorgan closed 7 years ago

georgemorgan commented 8 years ago

Since we will be writing language bindings for all of the built-in Flipper drivers, perhaps we should come up with some way to organize the language-specific code necessary for each language binding alongside the C implementation for each FMR target.

TravisWhitaker commented 8 years ago

By "language-specific code" do you mean extra C code enabling a specific language binding (we don't have any of that right now and IMO should keep it that way if possible) or code in the target language itself?

Many languages' build tools have the notion of a "package" or some other distributable unit, and typically such a unit exists under a single directory. In some cases there are specific restrictions how the source must be split into multiple files or folders (Java and Haskell both have such requirements, there may be more) It might not be easy to get these build systems to cope with source spread out through the driver folders.

Alternatively, we could enforce a common structure and naming scheme on all language binding source trees, but even this might not be possible (or desirable) in general, as different structural idioms will be necessary (or expected, or simply popular) in each case.

harlanhaskins commented 8 years ago

Swift certainly does.