From cc3429220b19df8c5ca6abf28a02cd38d08de32d Mon Sep 17 00:00:00 2001 From: Vasco Date: Mon, 24 Aug 2026 17:47:30 +0100 Subject: Cool 0.0.0. Rend 1.0.4. --- Cool/README.md | 44 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 Cool/README.md (limited to 'Cool/README.md') diff --git a/Cool/README.md b/Cool/README.md new file mode 100644 index 0000000..3c9f770 --- /dev/null +++ b/Cool/README.md @@ -0,0 +1,44 @@ +# Cool + +Build server-side components with C! Use the single-header library as a standalone HTML formatter +or use the transpiler to convert `.cool` files into `.c` files that you can include directly! + +## Example + +Write something like so: + +```code +COOL void Api(char *name, char *func, char *desc) { +
+

{ name }

+ { func } +
+ { desc } +
+
+} +``` + +Call `compiler.py` to get `view.cool.c` and include it into your code. + +```c +#include "views.cool.c" // include server side components directly + +int main() { + char func_name[256]; + char func_decl[256]; + char *comment_text = NULL; + /* ... */ + /* call you view directly! */ + if (feel_like_it) { + Api(func_name, func_decl, comment_text); + } + return 0; +} + +``` + +## Contributing + +This is one of the few open source projects where I'm very open to contribution. +Web is not my area of expertise. And this idea deserves fome fleshing out. -- cgit v1.3.1