Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
/libPublic

single header libraries for C/C++

NotificationsYou must be signed in to change notification settings

vurtun/lib

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

My single header libraries for C/C++.

librarylastest versioncategoryLoClicensedescription
json.h1.00parser848zlibnon-allocating json parser
sched.h1.00multithreading699zlibmultithreaded task scheduler
web.h1.00network1455BSDlightweight webserver
sdefl.h1.00compression525public domaindeflate compressor
sinfl.h1.00decompression320public domaindeflate decompressor

Total libraries: 5
Total lines of C code: 4487

FAQ

Why single-file headers?

Windows doesn't have standard directories where librarieslive. That makes deploying libraries in Windows a lot morepainful than open source developers on Unix-derivates generallyrealize. (It also makes library dependencies a lot worse in Windows.)

There's also a common problem in Windows where a library was builtagainst a different version of the runtime library, which causeslink conflicts and confusion. Shipping the libs as headers meansyou normally just compile them straight into your project withoutmaking libraries, thus sidestepping that problem.

Making them a single file makes it very easy to justdrop them into a project that needs them. (Of course you canstill put them in a proper shared library tree if you want.)

Why not two files, one a header and one an implementation?The difference between 10 files and 9 files is not a big deal,but the difference between 2 files and 1 file is a big deal.You don't need to zip or tar the files up, you don't have toremember to attachtwo files, etc.

Where is the documentation?

Each file has documentation, basic ussage description andexamples at the top of the file. In addition each API function,struct and member variables are documented as well.Finally each library has a corresponding test file inside thetest directory for additional working examples.

Why C?

Personally I primarily use C instead of C++ and since I want tosupport both C and C++ and C++ is not useable from C I therefore focuson C.

Why C89?

I use C89 instead of C99/C11 for its portability between different compilersand accessiblity for other languages.

References


[8]ページ先頭

©2009-2025 Movatter.jp