doompanning/external/nng/etc/README.adoc

47 lines
1.7 KiB
Text
Raw Normal View History

= About This Directory
This directory contains support files that I use for developing this
project.
== Coding Style
A clang-format configuration file is included in the project, you should
use that. (clang format requires that the style file live at the top of
of the project tree, not somewhere else, such as this etc directory.) The
format rules are probably inappropriate for the test/ subdirectory, as
the Convey framework has a style all it's own.
The style is based loosely on WebKit, but is really modified -- someday
if clang-format ever learns about BSD KNF I'll probably switch to that.
== Sublime Text
I've also arranged for Sublime text to understand that .h is C, not C++ (this
is important!)
Having said that, these days I do most development on this project using CLion
from JetBrains.
== ISO Standard C 99
This project uses C99. You may need to have modern compilers and
a modern SDK. (Famously Windows Visual Studio releases older than
2015 will either work poorly, or not at all.)
== Naming Conventions
We use nng_ (and NNG_) for symbols that are intended to be exported to consumers.
These symbols form part of our public API.
We use nni_ and NNI_ for symbols that are *NOT* part of our public API and
should not be used by users.
Statics may have any non-conflicting name.
Note that for the most part we try to avoid exposing structures directly to
users so that they don't get baked into binaries -- preferring instead to
dynamically allocate and give back an opaque pointer to the API. Any
exceptions to this case need to be VERY carefully reviewed to make sure
that the thing is unlikely to change (in any way whatsoever) in the future,
or that adequate provisions for versioning have been made.