0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2025-01-10 15:03:54 +01:00
construct/include/ircd
2023-01-19 19:58:23 -08:00
..
buffer ircd::buffer: Suppress errant array/stringop-overflow in debug+assert mode. 2023-01-15 22:32:00 -08:00
cl ircd:🆑 Conf items for device queueing and queue size defaults. 2023-01-01 21:28:54 +00:00
ctx ircd::ctx: Update stack allocator for official support. (boost-1.80) 2023-01-19 19:58:22 -08:00
db ircd::db::column: Add parallel fetch closure for zero-copy closure. 2022-08-16 22:21:52 -07:00
fs ircd::fs: Additional convenience tools for path suite. 2022-11-03 18:28:53 +00:00
gpt ircd::gpt: Remove hostside backprop branch for now; simplify sample tokenizer. 2022-11-03 18:28:53 +00:00
http2
ios
js
json ircd::json::value: Add single-arg template ctors for value and member array. 2023-01-19 19:58:22 -08:00
m ircd:Ⓜ️:trace: Add interface for the trace. 2022-09-28 15:05:43 -07:00
math ircd::math: Add difference template convenience. 2023-01-01 21:28:54 +00:00
mods
net ircd::net::dns::resolver: Question must match or this is the mist of a packet spray. 2022-08-15 12:38:21 -07:00
prof
resource
server ircd::server: Fix introduced macro conflict. (gcc-9) 2022-09-10 11:40:33 -07:00
simd ircd: Remove gratuitous alignment attributes. 2023-01-15 22:32:00 -08:00
simt ircd::simt: Add hardware ident access register (AMDDNA) 2023-01-02 20:25:58 +00:00
spirit
util ircd::util::bitset: Add bounds-check appeasing stringop-overflow (gcc-12). 2023-01-15 22:32:00 -08:00
.gitignore
allocator.h
asio.h ircd::ctx: Update stack allocator for official support. (boost-1.80) 2023-01-19 19:58:22 -08:00
assert.h
b58.h
b64.h
backtrace.h
beep.h
byte_view.h
cbor.h
client.h
cmp.h
color.h
conf.h ircd::conf: Add nothrow overloads to get() suite. 2023-01-19 19:58:23 -08:00
crh.h
demangle.h
ed25519.h
exception.h
exec.h
fmt.h
fpe.h
globular.h
grammar.h
http.h
icu.h
info.h ircd::info: Proper prctl check for cpuid availability. 2022-08-27 01:52:05 -07:00
iov.h
ircd.h
js.h
leb128.h
lex_cast.h
logger.h
magic.h
magick.h
Makefile.am Ensure EXTRA_*FLAGS is properly appended after other build flags. 2023-01-18 08:11:02 -08:00
matrix.h
nacl.h
openssl.h
panic.h
parse.h
pbc.h
png.h
portable.h ircd: Remove gratuitous alignment attributes. 2023-01-15 22:32:00 -08:00
rand.h
README.md
rfc1035.h
rfc1459.h
rfc3986.h
run.h
spirit.h
stats.h
stdinc.h
stduse.h
string_view.h
stringops.h ircd: Fix stringop-overread complaint for memchr on empty str (gcc-12). 2023-01-15 22:32:00 -08:00
strl.h
strn.h
sys.h
terminate.h
time.h
tokens.h ircd::tokens: Relax noexcept on token result closures. 2022-10-08 15:37:14 -07:00
utf8.h
utf16.h
vector_view.h
versions.h
vg.h

IRCd Library API

Project Namespaces

  • IRCD_ Preprocessor #define and macros.
  • RB_ Build system related preprocessor #defines and macros (legacy).
  • ircd_ C namespace and demangled bindings.
  • ircd:: C++ namespace scope.
  • X-IRCd- HTTP header key namespace.
  • ircd. Matrix event type namespace.
  • ircd_ Environmental variables (see: conf.h).

What To Include

libircd headers are organized into several aggregates groups

As a C++ project there are a lot of header files. Header files depend on other header files. We don't expect the developer of a compilation unit to figure out an exact list of header files necessary to include for that unit. Instead we have aggregated groups of header files which are then precompiled. These aggregations are mostly oriented around a specific project dependency.

Note: The term 'stack' may be found in place of the preferred term 'group' in other documentation.

  • Standard Include group <ircd/ircd.h> is the main header group. This group involves the standard library and most of libircd. This is what an embedder will be working with. These headers will expose our own interfaces wrapping 3rd party dependencies which are not included there.

    There are actually two files in play here: <ircd/ircd.h> and <ircd/ircd.pic.h>. The latter is generated dynamically and will not exist until make creates it. We have to offer two different pre-compilations: one with -fPIC and one without.

  • Boost ASIO include group <ircd/asio.h> is a header group exposing the boost::asio library. We only involve this header in compilation units working directly with asio for networking et al. Involving this header file slows down compilation compared with the standard group.

  • Boost Spirit include group <ircd/spirit.h> is a header group exposing the spirit parser framework to compilation units which involve formal grammars. Involving this header is a monumental slowdown when compiling.

  • JavaScript include group <ircd/js/js.h> is a header group exposing symbols from the SpiderMonkey JS engine. Alternatively, <ircd/js.h> is part of the standard include group which includes any wrapping to hide SpiderMonkey.

  • MAPI include group <ircd/mapi.h> is the standard header group for modules. This group is an extension to the standard include group but has specific tools for pluggable modules which are not part of the libircd core.

Invocation

libircd is not thread-safe. It does not protect exposed interfaces with locks. Embedders must access libircd from a single thread.

Initialize the library with a call to ircd::init().