Run frontier MoE models on hardware you already own — pure C, zero deps, experts streamed from disk. Tiny engine, immense model. 🐦
C
own_file: refuse a mode other than r or w on Windows too
JustVuggf150d2b88e11
diff --git a/c/own_file.h b/c/own_file.hindex c27e52e5..870ddcd7 100644--- a/c/own_file.h+++ b/c/own_file.h@@ -39,6 +39,7 @@ static inline int coli_own_is_link(const char *path){}static inline FILE *coli_own_fopen(const char *path, const char *mode){+ if(mode[0] != 'r' && mode[0] != 'w'){ errno = EINVAL; return NULL; } /* the modes the POSIX side takes */DWORD a = GetFileAttributesA(path);if(a != INVALID_FILE_ATTRIBUTES){if(a & FILE_ATTRIBUTE_REPARSE_POINT){ errno = ELOOP; return NULL; }