From 417c55786888a15f12288586997faef5c97cb403 Mon Sep 17 00:00:00 2001 From: NagyZoltanPeter <113987313+NagyZoltanPeter@users.noreply.github.com> Date: Tue, 17 Feb 2026 03:35:51 +0100 Subject: [PATCH] cleanup readme docs --- liblogosdelivery/BUILD.md | 41 -------------- liblogosdelivery/MESSAGE_EVENTS.md | 2 +- liblogosdelivery/examples/README.md | 88 ----------------------------- 3 files changed, 1 insertion(+), 130 deletions(-) delete mode 100644 liblogosdelivery/examples/README.md diff --git a/liblogosdelivery/BUILD.md b/liblogosdelivery/BUILD.md index c038f011d..011fbb438 100644 --- a/liblogosdelivery/BUILD.md +++ b/liblogosdelivery/BUILD.md @@ -35,23 +35,6 @@ Compile the C example that demonstrates all library features: # Using Make (recommended) make liblogosdelivery_example -# Or manually on macOS: -gcc -o build/liblogosdelivery_example \ - liblogosdelivery/examples/liblogosdelivery_example.c \ - -I./liblogosdelivery \ - -L./build \ - -llmapi \ - -Wl,-rpath,./build - -# Or manually on Linux: -gcc -o build/liblogosdelivery_example \ - liblogosdelivery/examples/liblogosdelivery_example.c \ - -I./liblogosdelivery \ - -L./build \ - -llmapi \ - -Wl,-rpath='$ORIGIN' -``` - ## Running Examples ```bash @@ -100,30 +83,6 @@ export DYLD_LIBRARY_PATH=/path/to/build:$DYLD_LIBRARY_PATH export LD_LIBRARY_PATH=/path/to/build:$LD_LIBRARY_PATH ./build/liblogosdelivery_example ``` - -### Compilation fails - -Make sure you've run: -```bash -make update -``` - -This updates all git submodules which are required for building. - -## Static Linking - -To link statically instead of dynamically: - -```bash -gcc -o build/logosdelivery_example \ - liblogosdelivery/examples/logosdelivery_example.c \ - -I./liblogosdelivery \ - build/liblogosdelivery.a \ - -lm -lpthread -``` - -Note: Static library is much larger (~129MB) but creates a standalone executable. - ## Cross-Compilation For cross-compilation, you need to: diff --git a/liblogosdelivery/MESSAGE_EVENTS.md b/liblogosdelivery/MESSAGE_EVENTS.md index ff7eb78c0..60740fb62 100644 --- a/liblogosdelivery/MESSAGE_EVENTS.md +++ b/liblogosdelivery/MESSAGE_EVENTS.md @@ -2,7 +2,7 @@ ## Overview -The LMAPI library emits three types of message delivery events that clients can listen to by registering an event callback using `logosdelivery_set_event_callback()`. +The liblogosdelivery library emits three types of message delivery events that clients can listen to by registering an event callback using `logosdelivery_set_event_callback()`. ## Event Types diff --git a/liblogosdelivery/examples/README.md b/liblogosdelivery/examples/README.md deleted file mode 100644 index 02a71c5de..000000000 --- a/liblogosdelivery/examples/README.md +++ /dev/null @@ -1,88 +0,0 @@ -# Examples for liblogosdelivery - -This directory contains example programs demonstrating the usage of the Logos Messaging API (LMAPI) library. - -## Building the Examples - -### Prerequisites - -1. Build the liblogosdelivery library first: - ```bash - cd /path/to/logos-messaging-nim - make liblogosdelivery - ``` - -2. The library will be available in `build/liblogosdelivery.so` (or `.dylib` on macOS, `.dll` on Windows) - -### Compile the liblogosdelivery Example - -#### On Linux/macOS: -```bash -# Shared library -gcc -o liblogosdelivery_example liblogosdelivery_example.c -I.. -L../../build -llmapi -Wl,-rpath,../../build - -# Static library (if built with STATIC=1) -gcc -o liblogosdelivery_example liblogosdelivery_example.c -I.. ../../build/liblogosdelivery.a -lpthread -lm -ldl -``` - -#### On macOS: -```bash -gcc -o liblogosdelivery_example liblogosdelivery_example.c -I.. -L../../build -llmapi -``` - -#### On Windows (MinGW): -```bash -gcc -o liblogosdelivery_example.exe liblogosdelivery_example.c -I.. -L../../build -llmapi -lws2_32 -``` - -## Running the Examples - -### liblogosdelivery Example - -```bash -./liblogosdelivery_example -``` - -This example demonstrates: -1. Creating a node with configuration -2. Starting the node -3. Subscribing to a content topic -4. Sending a message -5. Unsubscribing from the topic -6. Stopping and destroying the node - -### Expected Output - -``` -=== Logos Messaging API (LMAPI) Example === - -1. Creating node... -[create_node] Success - -2. Starting node... -[start_node] Success - -3. Subscribing to content topic... -[subscribe] Success - -4. Sending a message... -[send] Success: - -5. Unsubscribing from content topic... -[unsubscribe] Success - -6. Stopping node... -[stop_node] Success - -7. Destroying context... -[destroy] Success - -=== Example completed === -``` - -## Notes - -- The examples use simple synchronous callbacks with sleep() for demonstration -- In production code, you should use proper async patterns -- Error handling in these examples is basic - production code should be more robust -- The payload in messages must be base64-encoded