0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2025-01-09 22:36:00 +01:00
construct/include/ircd
Jason Volk 0fd5514d49 ircd:Ⓜ️ Add m::member(event) convenience inline interface.
ircd:Ⓜ️:membership: Assertions for event type; optimize branch.
2023-02-18 16:41:33 -08:00
..
allocator ircd::allocator::node: Add scope usage convenience. 2023-02-05 18:45:08 -08:00
buffer
cl Fix undef var templates for explicit instantiations across units (-Wundefined-var-template). 2023-02-04 13:20:44 -08:00
ctx ircd::ctx: Fix erroneous comment. [ci skip] 2023-02-04 13:20:44 -08:00
db ircd::db: Shorter paths to valid(iterator); strip noexcept; hot annotate uninlineable. 2023-02-18 16:41:33 -08:00
fs
gpt ircd::gpt: Add micro-benchmark start/stop probes. 2023-02-16 21:13:18 -08:00
http2
ios Fix undef var templates for explicit instantiations across units (-Wundefined-var-template). 2023-02-04 13:20:44 -08:00
js
json ircd::json: Eliminate double-references; optimize ABI. 2023-02-12 19:19:56 -08:00
m ircd:Ⓜ️ Add m::member(event) convenience inline interface. 2023-02-18 16:41:33 -08:00
math
mods
net Replace additional #ifdef debug related w/ if constexpr for regression visibility. 2023-02-17 19:10:06 -08:00
prof ircd: Fix -Wdeprecated-copy-with-user-provided-dtor or remove empty dtors. 2023-02-17 16:51:54 -08:00
resource ircd::resource::response::chunked::json: Use template for top object or array type. 2023-02-05 19:57:08 -08:00
server ircd: Internalize various loghead utils; remove legacy ostream operators. 2023-02-09 11:41:11 -08:00
simd ircd::util: Add popcount wrapping; consolidate callsites. 2023-02-07 20:04:26 -08:00
simt
spirit
util ircd: Add function_bool convenience template alias. 2023-02-16 20:53:30 -08:00
.gitignore
asio.h
assert.h ircd: Attribute nodebug on assert frames, artificial ineffective for clang. 2023-02-09 11:11:01 -08:00
b58.h
b64.h
backtrace.h
beep.h
byte_view.h
cbor.h
client.h ircd::client: Remove redundant local endpoint state. (related 1da91f41b3) 2023-02-09 11:41:11 -08:00
cmp.h
color.h
conf.h
crh.h
demangle.h
ed25519.h
exception.h
exec.h Fix undef var templates for explicit instantiations across units (-Wundefined-var-template). 2023-02-04 13:20:44 -08:00
fmt.h
fpe.h
globular.h ircd::util: Generalize util::boolean into returns template. 2023-02-09 19:17:45 -08:00
grammar.h
http.h
icu.h
info.h
iov.h
ircd.h ircd::util: Add popcount wrapping; consolidate callsites. 2023-02-07 20:04:26 -08:00
js.h
leb128.h
lex_cast.h
logger.h Fix undef var templates for explicit instantiations across units (-Wundefined-var-template). 2023-02-04 13:20:44 -08:00
magic.h
magick.h
Makefile.am
matrix.h
nacl.h
openssl.h
panic.h
parse.h
pbc.h
png.h
portable.h ircd::portable: Fix __builtin_unpredictable macro, takes no value argument. 2023-02-12 19:19:56 -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
strl.h
strn.h
sys.h
terminate.h
time.h
tokens.h
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().