________ ________ ________ ________ _______
|\_____ \|\ ____\|\ __ \|\ __ \|\ ___ \
\|___/ /\ \ \___|\ \ \|\ \ \ \|\ \ \ __/|
/ / /\ \ \ \ \ \\\ \ \ _ _\ \ \_|/__
/ /_/__\ \ \____\ \ \\\ \ \ \\ \\ \ \_| \
|\________\ \_______\ \_______\ \__\\ _\\ \_______\
\|_______|\|_______|\|_______|\|__|\|__|\|_______|
what is zcore? zcore is a tiny & simple syscall wrapper that is designed to be used in tiny and modular projects.
basically overhauled every single header, dont worry the names are the same your code should keep working its now much safer using PROPER asm volatile stuff in C new headers coming soon :3
to update, re-git-clone it and run the install script again, see INSTALL ;)
shell ( with cd & args ) at 680 bytes ( wow! ) hello world in 331 bytes see demos for proof
zcore: none. just a c compiler
tbt: elf-kickers (strip, sstrip) & a c compiler
well, YOU ( yes, you! ) should try zcore because it is TINY.. and i mean TINY.. if you use tbt ( tiny binary tool ) which helps compiling with the agressive flags and stripping needed to make it EVEN. SMALLER. you can get a hello world in like 300~ bytes which is really cool. i got a SHELL. in 710~ bytes. thats kinda crazy. no its not atsh because that is completely dependency-less its like 20 bytes smaller because it needs to include everything inside there but if you want a STABLE, NO TROUBLESHOOTING project that doesnt aim for binary size, maybe skip zcore.
compile flags:
cc -Os -nostdlib -static -fno-asynchronous-unwind-tables -fno-stack-protector \
-Wl,--build-id=none -Wl,-nmagic -s <your-file.c> -o <your-binary>strip & sstrip flags:
strip -R .comment -R .note.gnu.property --strip-all <your-binary> &&
sstrip <your-binary>git clone https://github.com/chromalence/zcore &&
cd zcore &&
chmod +x install.sh &&
./install.shif you arent using tbt, atleast get the compile flags out of it 😭 like PLEASE or if you dont care about binary size at ALL just MAKE SURE TO USE: -nostdlib -static in your compile. ( and also void _start() instead of int main() )
a tiny binary tool, see tbt help or just read this: -h > shows this, for help -f > compiles and strips -cc > compiles -s > strips anyways, it makes your binaries really small. its a small tool written in bash
#include <zcore/print.h> // we are getting print, ONLY PRINT!!
#include <zcore/exit.h> // its so modular & minimal it doesnt even give you exit.
void _start() { // no int main(); .
zprint(1, "hello world\n", 12); // its just write, without the BLOAT.
zexit(0); // and this is just, _exit, without the BLOAT!!!!!
}i dont archive them like in chroctl every update previous headers are UNTOUCHED unless it needed a fix. no syntax changing ok. its modular, not like stdio where if they put something new you GOTTA use it even if you are ONLY printing hello world
GPLv3 see LICENSE file for more info its copyleft so if you take my code and add more stuff to it and keep it closed source you cant do that :P >:D
keep in mind im a solo dev that only checks github to push updates & fixes, if you have a PR here are my rules
- keep it simple
- make it modular
- make it useful
- ( MOST IMPORTANT ) make it tiny if it doesnt abide by these i likely wont like pull it
have a nice day