jasmcaus / tau

A Micro (1k lines of code) Unit Test Framework for C/C++
MIT License
158 stars 30 forks source link

design questions on minimizing dependencies #25

Open matu3ba opened 2 years ago

matu3ba commented 2 years ago

I am wondering, if

include

include

are strictly necessary, as we only need a few of the functions and argument handling doesnt sound super complicated either.

Can you add a comment on the other headers, what they are used for?

    #include <errno.h> // Kernel error codes
    #include <libgen.h> // regex for filter [but only contains dirname and __xpg_basename, so kinda useless???
    #include <unistd.h> // file seek
    #include <sys/types.h> // system types, but where are those used?!
    #include <sys/wait.h> // also includes features.h, pid exit status etc as process info
    #include <signal.h> // signal handler
    #include <time.h> // time
jasmcaus commented 2 years ago

Do you mean remove the includes completely, and add your own implementations only for the functions Tau uses? I'm all for minimal dependencies, but there are some sane arguments for using optimized-library functions.

That said, I'm experimenting with writing my own implementations for such library functions. I'm not going to include them with Tau for simplicity reasons, but I encourage you to check the core for my compiler which is a mini-C library of sorts. Most changes are periodically reflected in the CSTL repo for easy use.