-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsplinter_cli_cmd_caps.c
More file actions
67 lines (54 loc) · 1.24 KB
/
splinter_cli_cmd_caps.c
File metadata and controls
67 lines (54 loc) · 1.24 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
/**
* Copyright 2025 Tim Post
* License: Apache 2 (MIT available upon request to timthepost@protonmail.com)
*
* @file splinter_cli_cmd_caps.c
* @brief Implements the CLI 'caps' command.
*/
#include <stdio.h>
#include "splinter_cli.h"
#include "config.h"
static const char *modname = "caps";
void help_cmd_caps(unsigned int level) {
(void) level;
printf("%s prints version, build, and compiled-in feature flags.\n", modname);
printf("Usage: %s\n", modname);
printf("Output is key=value, one per line; suitable for scripting.\n");
}
int cmd_caps(int argc, char *argv[]) {
(void) argc;
(void) argv;
printf("version=%s\n", SPLINTER_VERSION);
printf("build=%s\n", SPLINTER_BUILD);
#ifdef HAVE_LUA
printf("lua=yes\n");
#else
printf("lua=no\n");
#endif
#ifdef HAVE_WASM
printf("wasm=yes\n");
#else
printf("wasm=no\n");
#endif
#ifdef HAVE_EMBEDDINGS
printf("embeddings=yes\n");
#else
printf("embeddings=no\n");
#endif
#ifdef HAVE_LLAMA
printf("llama=yes\n");
#else
printf("llama=no\n");
#endif
#ifdef HAVE_NUMA
printf("numa=yes\n");
#else
printf("numa=no\n");
#endif
#ifdef SPLINTER_PERSISTENT
printf("persistent=yes\n");
#else
printf("persistent=no\n");
#endif
return 0;
}