# Supported in C

This page lists the C libraries, frameworks and build tools Niro was tested against, and whether it recognised each one.

**What the marks mean.**

- **Supported:** Niro recognised every way of using it that the test code tries.

- **Partly:** Niro recognised some of those ways, or recognised one only in part.

- **Not yet:** Niro did not recognise it in the test code.

The test code is made up for the purpose: one small service per library, with the names invented. So "supported" means Niro recognised it there. It is good evidence, but it is not a promise about every codebase. If Niro misses something in your code, the coverage audit reports the gap on its own (see [Coverage audit](https://help.niroai.dev/cli/coverage-audit-and-consent/)).

## Web frameworks and HTTP servers (the routes your code serves)

0 supported, 0 partly, 10 not yet.

| Name | Status | Ways of using it that were tested |
| --- | --- | --- |
| Cesanta mongoose | not yet | no: mg_http_listen + handler that matches hm->uri with mg_match no: mg_http_match_uri(hm, path) (mongoose 7.0 to 7.13) |
| civetweb (C API) | not yet | no: mg_set_request_handler(ctx, path, handler, cbdata) no: mg_set_websocket_handler(ctx, path, ...) no: mg_set_auth_handler(ctx, path, handler, cbdata) |
| facil.io | not yet | no: http_listen with one on_request; path compared inside |
| GNU libmicrohttpd | not yet | no: one MHD_AccessHandlerCallback; url and method compared inside it |
| Kore | not yet | no: routes declared in kore.conf (`route /path handler`) |
| libevent evhttp | not yet | no: evhttp_set_cb(http, path, cb, arg) |
| libh2o | not yet | no: h2o_config_register_path(hostconf, path, flags) + handler |
| libsoup (GNOME) | not yet | no: soup_server_add_handler(server, path, cb, data, destroy) |
| Lwan | not yet | no: lwan_url_map array of {.prefix, .handler} |
| Ulfius | not yet | no: ulfius_add_endpoint_by_val(inst, verb, prefix, template, priority, cb, data) |

## The language's own HTTP server

0 supported, 0 partly, 1 not yet.

| Name | Status | Ways of using it that were tested |
| --- | --- | --- |
| POSIX sockets (no library) | not yet | no: socket/bind/listen/accept, request line read with sscanf, path compared with strcmp |

## HTTP client libraries (the calls your code makes to other services)

0 supported, 0 partly, 6 not yet.

| Name | Status | Ways of using it that were tested |
| --- | --- | --- |
| Cesanta mongoose | not yet | no: mg_http_connect(mgr, url, fn, data); request written in fn |
| civetweb (C API) | not yet | no: mg_download(host, port, ssl, ebuf, len, request line) |
| libcurl | not yet | no: curl_easy_setopt(h, CURLOPT_URL, literal) then curl_easy_perform no: CURLOPT_URL then CURLOPT_POSTFIELDS (verb is POST) no: CURLOPT_CUSTOMREQUEST names the verb no: base URL from getenv, path appended with snprintf no: curl_url_set(h, CURLUPART_URL, literal) + CURLOPT_CURLU no: easy handle with URL added to a multi handle no: URL in a #define used as the option value |
| libevent evhttp | not yet | no: evhttp_connection_base_new(base, dns, host, port) + evhttp_make_request(conn, req, verb, path) |
| libsoup (GNOME) | not yet | no: soup_message_new(verb, url) + soup_session_send_and_read |
| neon | not yet | no: ne_session_create(scheme, host, port) + ne_request_create(sess, verb, path) |

## The language's own HTTP client

0 supported, 0 partly, 1 not yet.

| Name | Status | Ways of using it that were tested |
| --- | --- | --- |
| POSIX sockets (no library) | not yet | no: getaddrinfo + connect + send of a hand-written request line |

## gRPC

0 supported, 0 partly, 1 not yet.

| Name | Status | Ways of using it that were tested |
| --- | --- | --- |
| gRPC core C API | not yet | no: grpc_channel_create + grpc_channel_create_call with a method slice |

## Databases and data stores

0 supported, 4 partly, 4 not yet.

| Name | Status | Ways of using it that were tested |
| --- | --- | --- |
| hiredis | partly | yes: redisCommand(ctx, "VERB key ...", args) no: redisCommandArgv(ctx, argc, argv, lens) no: redisAppendCommand (pipelining) + redisGetReply |
| libmemcached | not yet | no: memcached_set / memcached_get / memcached_delete with a key |
| libmysqlclient / MariaDB Connector/C | partly | no: mysql_real_connect(conn, host, user, pw, db, port, ...) yes: mysql_query(conn, sql) yes: mysql_real_query(conn, sql_variable, len) no: mysql_stmt_prepare(stmt, sql, len) + mysql_stmt_execute |
| libpq | partly | no: PQconnectdb with a URI or key=value connection string partly: PQexec(conn, sql) yes: PQexecParams(conn, sql, n, types, values, ...) yes: PQprepare(conn, name, sql, ...) then PQexecPrepared(conn, name, ...) no: PQsendQuery / PQsendQueryParams (asynchronous) |
| LMDB / Berkeley DB | not yet | no: embedded key-value stores (mdb_put, db->put) |
| MongoDB C driver (libmongoc) | not yet | no: mongoc_client_get_collection(client, db, name) + insert_one / find_with_opts / update_one / delete_one no: mongoc_database_get_collection(db, name) |
| ODBC (unixODBC / Windows driver manager) | not yet | no: SQLExecDirect(stmt, sql, SQL_NTS) and SQLPrepare + SQLExecute |
| SQLite C API | partly | yes: sqlite3_exec(db, sql, cb, arg, err) no: sqlite3_prepare_v2(db, SQL_CONSTANT, -1, &stmt, NULL) no: sqlite3_prepare_v3 (and sqlite3_prepare16_v2) |

## Messaging and events (queues, topics, streams)

1 supported, 0 partly, 11 not yet.

| Name | Status | Ways of using it that were tested |
| --- | --- | --- |
| CZMQ | not yet | no: zsock_new_pub("@tcp://...") / zsock_new_sub(">tcp://...", prefix) |
| D-Bus (libdbus / sd-bus) | not yet | no: dbus_message_new_signal(path, iface, name) / sd_bus_emit_signal |
| Eclipse Paho MQTT C | not yet | no: MQTTClient_publishMessage(client, topic, &msg, &token) no: MQTTClient_publish(client, topic, len, payload, qos, retained, &token) no: MQTTClient_subscribe(client, topic, qos) no: MQTTAsync_sendMessage / MQTTAsync_subscribe |
| hiredis | not yet | no: redisCommand(ctx, "PUBLISH channel %s", payload) no: redisAsyncCommand(ac, cb, data, "SUBSCRIBE channel") |
| libmosquitto | supported | yes: mosquitto_publish(mosq, mid, topic, len, payload, qos, retain) yes: mosquitto_subscribe(mosq, mid, topic, qos) |
| libpq | not yet | no: PQexec(conn, "LISTEN ch") / "NOTIFY ch" (PostgreSQL pub-sub) |
| librdkafka (C API) | not yet | no: rd_kafka_topic_new(rk, name, conf) then rd_kafka_produce(rkt, ...) no: rd_kafka_producev(rk, RD_KAFKA_V_TOPIC(name), ...) no: rd_kafka_topic_partition_list_add(list, name, part) + rd_kafka_subscribe |
| nanomsg | not yet | no: nn_socket(AF_SP, NN_PUB) + nn_bind + nn_send; nn_connect for SUB |
| NATS C client (cnats) | not yet | no: natsConnection_PublishString(nc, subject, data) no: natsConnection_Subscribe(&sub, nc, subject, cb, closure) no: natsConnection_RequestString(&reply, nc, subject, data, timeout) |
| nng | not yet | no: nng_pub0_open + nng_listen; nng_sub0_open + NNG_OPT_SUB_SUBSCRIBE + nng_dial |
| rabbitmq-c (librabbitmq) | not yet | no: amqp_basic_publish(conn, ch, exchange, routing_key, ...) no: amqp_queue_declare + amqp_basic_consume(conn, ch, queue, ...) |
| ZeroMQ (libzmq) | not yet | no: zmq_socket(ctx, ZMQ_PUB) + zmq_bind(addr) + zmq_send no: zmq_connect(addr) + zmq_setsockopt(ZMQ_SUBSCRIBE, prefix) no: ZMQ_REP bound socket answering ZMQ_REQ peers |

## Build tools and package managers

7 supported, 0 partly, 0 not yet.

| Name | Status | Ways of using it that were tested |
| --- | --- | --- |
| CMake (C project) | supported | yes: root project() + add_subdirectory per library and service; target_link_libraries |
| GNU Autotools | supported | yes: configure.ac + Makefile.am per folder: bin_PROGRAMS, lib_LTLIBRARIES, check_PROGRAMS |
| GNU Make | supported | yes: one Makefile at the root, sources in src/, one binary |
| GNU Make (recursive) | supported | yes: top Makefile with SUBDIRS and $(MAKE) -C, one Makefile per folder |
| Meson | supported | yes: meson.build with subdir(); executable(), static_library(), declare_dependency(), test() |
| PlatformIO | supported | yes: platformio.ini with src/, lib/<name>/, test/, and .pio/ output |
| SCons | supported | yes: SConstruct + SConscript per folder; Program() and StaticLibrary() |

## Project and folder layouts

5 supported, 0 partly, 0 not yet.

| Name | Status | Ways of using it that were tested |
| --- | --- | --- |
| Bison and Flex output checked in | supported | yes: gen/parser.tab.c and gen/lexer.c next to the .y grammar |
| CMake (include/ + src/ + apps/ + tests/) | supported | yes: public headers in include/<name>/, sources in src/, one root CMakeLists |
| CMake build folders and vendored copies | supported | yes: build/ and cmake-build-debug/ (CLion) output; third_party/ and deps/ vendored libraries |
| GNU Make + tests/ with its own Makefile | supported | yes: a test folder whose Makefile builds a test binary with a main |
| no build tool (shell script) | supported | yes: flat folder of .c files compiled by build.sh |