Skip to content
/ wstk_c Public

Web Services Toolkit (C library for developing cross-platform network/web services)

Notifications You must be signed in to change notification settings

akscf/wstk_c

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 

Repository files navigation

A pure C library that provides quite unified api to develop cross-platform applications, network/web services and so on.
This is kind of combination of some ideas from libraries such as: apache apr, libre and other (but with my needs)
The main goals is to have an easy way to developing and maintenance applications on the legacy system, such as: OS/2, Win2k3 or Solaris 10,
but the same time supports enough modern systems with the latest gcc/clang and keeps the abilities of using these new standards.
Actually, for a long time it was just like a set of files which I included in different projects, but recently time has appeared to arranges it as a library.

Version 1.2.0a (14.06.2024)

  • supported systems (which were tested):
    • OS/2 Warp4, eComstation 2.x and others if you manage to install: emx and gcc-3.2x, binutils-2x, gnu make 3x
    • Windows2003 (and other) MinGw-2.4 (gcc-6.3, binutils-2.x, gnu make 3.8) and if you want to have networking support, your winsock version should be not lower 2.2
    • Windows10 with the latest MSYS2
    • Solaris10/11 (gcc-5.5, binutils-2x, gnu make 4.x), actually was tested only on Sol10
    • FreeBSD-12 (clang-10x, gnu make-4.3) and other from the BSD family (NetBSD, OpenBSD, ...)
    • Linux ubuntu server 22.04 (gcc-11x, gnu make-4.3)
    • OpenWRT (*)

Actually it should work without any problem on platforms which meet the following conditions: gcc >= 3.2, gnu make >= 3.x, binutils-2.x

Capabilities:

  • threads/mutexes/sleeps - available on the whole systems, and contains special tools, such as: queue, worker (see: examples/test-queue.c, examples/test-worker.c)
  • networking, with a low level access to the sockets and its operations, as well as advanced multithreaded tcp/udp servers
  • polling, with the following methods: select, epoll and kqueue
  • loadable modules, capable to works with so/dll libraryes
  • includes structures such as: hashtable, linked list (see: examples/test-hashtable.c, exampes/test-list.c)
  • various operations with the strings: concat, replace, and so on (see: wstk-str.h)
  • some useful things was adopted from the libre, such as: mbuf, fmt, pl, regex, and so on
  • has a builtin multi-threaded http server with the ability to expansion through 'servlets' (see: examples/test-httpd-servlets.c)
    servlets:
    • servlet-jsonrpc - provides an easy way to write services (see: examples/test-httpd-jsonrpc.c)
    • servlet-websock - provides an api to use websockets (see: examples/test-httpd-websock.c)
    • servlet-upload - a simple way to upload files into the server (see: examples/test-httpd-upload.c)
  • on the modern systems (C11 standard) provides api to use atomic operations
  • ssl suppors ( * todo )
  • and other functionality, see examples...

Installation and build

The library doesn't contain any autotool scripts and so on, all the configurtion options defines in the main Makefile and wstk-core.h (as the preprocessor variables).
For build it is quite enough to perform: 'make clean all', and then manually copying the library file and headers to the desired location.
For build examples: make clean all TNAME={name} (for example: make clean all TNAME=list)

Releases

No releases published

Packages

No packages published