Remove libchat naming conflict

This commit is contained in:
Jazz Turner-Baggs 2026-01-26 16:59:08 -08:00
parent d1743126e7
commit 3205c71281
6 changed files with 20 additions and 20 deletions

View File

@ -108,21 +108,21 @@ tui bot_echo pingpong: | build-waku-librln build-waku-nat nim_chat_poc.nims
# Determine shared library extension based on OS
ifeq ($(shell uname -s),Darwin)
LIBCHAT_EXT := dylib
LIBLOGOSCHAT_EXT := dylib
else ifeq ($(shell uname -s),Linux)
LIBCHAT_EXT := so
LIBLOGOSCHAT_EXT := so
else
LIBCHAT_EXT := dll
LIBLOGOSCHAT_EXT := dll
endif
LIBCHAT := build/libchat.$(LIBCHAT_EXT)
LIBLOGOSCHAT := build/liblogoschat.$(LIBLOGOSCHAT_EXT)
.PHONY: libchat
libchat: | build-waku-librln build-waku-nat nim_chat_poc.nims
echo -e $(BUILD_MSG) "$(LIBCHAT)" && \
$(ENV_SCRIPT) nim libchat $(NIM_PARAMS) --path:src nim_chat_poc.nims && \
.PHONY: liblogoschat
liblogoschat: | build-waku-librln build-waku-nat nim_chat_poc.nims
echo -e $(BUILD_MSG) "$(LIBLOGOSCHAT)" && \
$(ENV_SCRIPT) nim liblogoschat $(NIM_PARAMS) --path:src nim_chat_poc.nims && \
echo -e "\n\x1B[92mLibrary built successfully:\x1B[39m" && \
echo " $(shell pwd)/$(LIBCHAT)"
echo " $(shell pwd)/$(LIBLOGOSCHAT)"
endif

View File

@ -1,13 +1,13 @@
# C Bindings Example - Chat TUI
A simple terminal user interface that demonstrates how to use libchat from C.
A simple terminal user interface that demonstrates how to use liblogoschat from C.
## Build
1. First, build libchat from the root folder:
1. First, build liblogoschat from the root folder:
```bash
make libchat
make liblogoschat
```
2. Then build the C example:

View File

@ -1,5 +1,5 @@
/**
* Simple Terminal UI for libchat.c
* Simple Terminal UI for liblogoschat.c
* Commands:
* /join <intro_bundle_json> - Join a conversation
* /bundle - Show your intro bundle
@ -17,7 +17,7 @@
#include <time.h>
#include <unistd.h>
#include "libchat.h"
#include "liblogoschat.h"
// Constants
static const int LOG_PANEL_HEIGHT = 6;

View File

@ -1,6 +1,6 @@
// Generated manually
#ifndef __libchat__
#define __libchat__
#ifndef __liblogoschat__
#define __liblogoschat__
#include <stddef.h>
#include <stdint.h>
@ -104,4 +104,4 @@ int chat_create_intro_bundle(void *ctx, FFICallBack callback, void *userData);
}
#endif
#endif /* __libchat__ */
#endif /* __liblogoschat__ */

View File

@ -1,4 +1,4 @@
## libchat - C bindings for the Chat SDK
## liblogoschat - C bindings for the Chat SDK
## Main entry point for the shared library
##
## This library exposes the Chat SDK functionality through a C-compatible FFI interface.
@ -89,7 +89,7 @@ proc chat_destroy(
checkParams(ctx, callback, userData)
ffi.destroyFFIContext(ctx).isOkOr:
let msg = "libchat error: " & $error
let msg = "liblogoschat error: " & $error
callback(RET_ERR, unsafeAddr msg[0], cast[csize_t](len(msg)), userData)
return RET_ERR

View File

@ -76,6 +76,6 @@ task pingpong, "Build the Pingpong example":
let name = "pingpong"
buildBinary name, "examples/", "-d:chronicles_log_level='INFO' -d:chronicles_disabled_topics='waku node' "
task libchat, "Build the Chat SDK shared library (C bindings)":
task liblogoschat, "Build the Chat SDK shared library (C bindings)":
buildLibrary "chat", "library/",
"-d:chronicles_log_level='INFO' -d:chronicles_enabled=on --path:src --path:vendor/nim-ffi"