From 8f67e3a6ce7f82600fa0df4107ecdbc02eb223b8 Mon Sep 17 00:00:00 2001 From: bumbread Date: Sun, 26 Jun 2022 15:39:15 +1100 Subject: [PATCH] Update readme --- lakefile.lua | 31 --------------------------- readme | 60 +++++++++++++++++++++++++++------------------------- todo | 5 ----- 3 files changed, 31 insertions(+), 65 deletions(-) delete mode 100644 lakefile.lua diff --git a/lakefile.lua b/lakefile.lua deleted file mode 100644 index db54fd1..0000000 --- a/lakefile.lua +++ /dev/null @@ -1,31 +0,0 @@ -local lake = require 'lakebuild' - --- NOTE(bumbread): change this to reflect the fact that --- now platform-independent stuff is in src/code and --- platform-dependent stuff is in src/$PALTFORM - -local function buildcmd(target) - local deps = "" - if target.userdata.add_deps then - deps = table.concat(target.deps, " ") - end - local buildline = table.concat({"clang", target.userdata.flags, target.files[1], "-o", target.name, deps}, " ") - print(buildline) - os.execute(buildline) -end - - --- build all loose C files other than main.c into object files -local files = lake.glob_combined(".", false, nil, function(_, n) return lake.endswith(n, ".c") and not lake.endswith(n, "main.c") end) -local objects = {} -for _,file in ipairs(files) do - local name = file[1] .. '.o' - lake:add_target(name, {file[2]}, buildcmd, {flags="-c", add_deps=false}) - table.insert(objects, name) -end - --- build main.c -lake:add_chain("main.exe", {"main.c"}, objects, buildcmd, {flags="-O2", add_deps=true}) - -lake:request_build("main.exe") - diff --git a/readme b/readme index 46c8b7c..8f4b7bd 100644 --- a/readme +++ b/readme @@ -1,41 +1,43 @@ ABOUT + Ciabatta - An implementation of CRT for x86-64 windows and linux platforms. +The goal is to provide a platform-independent CRT with the purpose of +explicitly defining some of platform-defined behaviours in order to simplify +the development and providing additional functionality to aid the developers in +writing cross-platform applications. -Ciabatta - An implementation of CRT for x86-64 windows and linux platforms. -What are the advantages over using your default CRT? I dunno but you can if you -want. I haven't ran any benchmarks or verified compliance yet, so use at your -own risk. Some functionality is way more sexier than your normal-ass CRT tho, -so you might consider switching. +Note that Undefined Behaviour is impossible to define on a CRT level, since the +semantics of the language can only be changed at the compiler level. Sometimes +the compilers will replace CRT function calls with builtin functions, which is +meant as an optimization, e.g. replacing some forms of prinf() with puts() or +replacing strlen with an x86 rep movsb instruction. Even if ciabatta does have +a specific behaviour under given UB conditions, that behaviour is not +guaranteed. +The goals: + - Providing API for sockets, unicode processing (not just encodings), maybe + the support for common image and data file formats and other useful + non-standard functionality. + - Making it easy to port the library to a new platform, e.g. a custom OS + kernel or a different processor architecture. + - Defining implementation-defined behaviours of some of the functions and + explicitly documenting them. + - Make it reasonably fast compared to MSVCRT and GLIBC. + +PLATFORM SUPPORT + OS/Kernel: + - Windows (64-bit) + - TODO: Linux + Processor Architecture + - x86-64 USAGE - -In order to build the library you need to have clang installed. Download the -source code, then run bake.cmd. Copy `ciabatta.lib` to a good place in your -project. - -Don't forget to include ciabatta's include directory: - /I inc (MSVC CL) - -I inc (Clang) - -For MSVC LINK add the following arguments: - /nodefaultlibs - ciabatta.lib - kernel32.lib - user32.lib - shell32.lib - -Link flags for average copy-paste enjoyers: - /nodefaultlibs ciabatta.lib kernel32.lib user32.lib shell32.lib - -(TODO: usage for clang) - + (TODO) CONTRIBUTING - -Pull requests are always welcome. + Pull requests are always welcome. LICENCE -TBD +TBD, but probably i'll make it MIT or WTFPL :kekw: diff --git a/todo b/todo index 1cc0a56..f25cc56 100644 --- a/todo +++ b/todo @@ -40,15 +40,10 @@ stdlib.h: Probably other stuff threads.h: - Make _Thread_local work on windows - Verify the mtx_recursive goes ok. Also change win_stdio.c accordingly. TODO: add todo items tgmath.h: Basically everything -uchar.h: - Basically everything - wchar.h: Basically everything