diff options
| author | Onur Gündüz <ogunduz@gmail.com> | 2026-06-16 16:27:47 +0200 |
|---|---|---|
| committer | Onur Gündüz <ogunduz@gmail.com> | 2026-06-16 16:27:47 +0200 |
| commit | d1ba1ebc06ef0d62ca932388fae83e6992594719 (patch) | |
| tree | f962207b779016593258f990348216999a58766a /src/server.h | |
| parent | be20dfda0f836808dccfc14db244592e41ba28bc (diff) | |
| download | ffwd-d1ba1ebc06ef0d62ca932388fae83e6992594719.tar.gz ffwd-d1ba1ebc06ef0d62ca932388fae83e6992594719.zip | |
chore: move sources to src/ with proper names, drop qwen_ prefix
Diffstat (limited to 'src/server.h')
| -rw-r--r-- | src/server.h | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/src/server.h b/src/server.h new file mode 100644 index 0000000..2a39b94 --- /dev/null +++ b/src/server.h @@ -0,0 +1,42 @@ +#ifndef EMBED_SERVER_H +#define EMBED_SERVER_H + +/* Public-API export annotation. The libraries are built with + * -fvisibility=hidden, so only declarations carrying EMBED_API are exported + * from the shared library; everything else stays internal. */ +#ifndef EMBED_API +#if defined(__GNUC__) +#define EMBED_API __attribute__((visibility("default"))) +#else +#define EMBED_API +#endif +#endif + +#include <stdbool.h> + +typedef struct { + const char *id; + const char *path; +} embed_server_model_spec_t; + +typedef struct { + const embed_server_model_spec_t *models; + int n_models; + const char *host; + int port; + int batch_size; + int max_batch_tokens; + int batch_wait_us; + int use_mlx; + int use_cuda; + int mlx_quantize_bits; + int mlx_quantize_group_size; + double memory_utilization; /* fraction of physical memory the MLX + preflight may plan for; 0 = default 0.90, + values above 1.0 allow overcommit */ + const char *api_key; +} embed_server_config_t; + +EMBED_API int embed_run_server(const embed_server_config_t *cfg); + +#endif |
