{"id":13420363,"url":"https://github.com/koanlogic/libu","last_synced_at":"2025-12-24T19:54:43.014Z","repository":{"id":790546,"uuid":"487733","full_name":"koanlogic/libu","owner":"koanlogic","description":"LibU is a multiplatform utility library written in C, with APIs for handling memory allocation, networking and URI parsing, string manipulation, debugging, and logging in a very compact way, plus many other miscellaneous tasks","archived":false,"fork":false,"pushed_at":"2023-01-03T08:20:06.000Z","size":971,"stargazers_count":438,"open_issues_count":2,"forks_count":97,"subscribers_count":32,"default_branch":"master","last_synced_at":"2024-07-31T22:54:57.695Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://koanlogic.com/libu","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/koanlogic.png","metadata":{"files":{"readme":"README","changelog":"ChangeLog","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2010-01-25T15:34:12.000Z","updated_at":"2024-06-22T04:32:00.000Z","dependencies_parsed_at":"2023-01-11T15:47:49.774Z","dependency_job_id":null,"html_url":"https://github.com/koanlogic/libu","commit_stats":null,"previous_names":[],"tags_count":26,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/koanlogic%2Flibu","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/koanlogic%2Flibu/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/koanlogic%2Flibu/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/koanlogic%2Flibu/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/koanlogic","download_url":"https://codeload.github.com/koanlogic/libu/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":221553270,"owners_count":16841996,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-07-30T22:01:32.107Z","updated_at":"2025-12-24T19:54:42.976Z","avatar_url":"https://github.com/koanlogic.png","language":"C","readme":"== MaKL is a Prerequisite ==\n\nLibU needs http://koanlogic.com/makl to configure and build. \n\nThe following commands should be sufficient to get MaKL installed on any Linux \nflavour or Darwin/MacOSX:\n\n$ wget http://koanlogic.com/download/makl/makl-${VERSION}.tar.gz\n$ tar zxf makl-${VERSION}.tar.gz \u0026\u0026 cd makl-${VERSION}\n$ sh configure.sh\n$ su \nPassword: ****\n# make install\n\nShould your platform be one of Solaris, OpenSolaris, FreeBSD, PC-BSD, OpenBSD,\nNetBSD, DragonflyBSD, Minix or Windows (MinGW or Gygwin) take a look at the \nINSTALL file in the top-level MaKL sources directory to track down specific \nvariations on the theme.\n\n== Download == \n\nOnce MaKL is there, you can start downloading the package (always check the \nofficial http://koanlogic.com/libu page for the latest version and related \nChangeLog) and tailor it to your specific needs:\n\n$ wget http://koanlogic.com/download/libu/libu-${VERSION}.tar.gz\n$ tar zxf libu-${VERSION}.tar.gz \u0026\u0026 cd libu-${VERSION}\n\n\n== Configure ==\n\nE.g. should you need to change the default installation path (i.e. /usr/local),\nuse:\n\n$ makl-conf --prefix=\"/my/install/base/dir\"\n\n\nDebug symbols and warnings from the compiler can be switched on via\n--enable_debug and --enable_warns (use --enable_icc_warns instead when \nworking with the Intel C compiler):\n\n$ makl-conf --enable_debug --enable_warns\n\n\nCode profiling using gprof(1) can be activated via --enable_profile, and,\nmore generally, any compiler flag can be passed to the build stage in the \nfollowing way:\n\n$ makl-conf --extra-cflags=\"-Wformat -Wno-format-extra-args -Wformat-security -Wformat-nonliteral -Wformat=2\"\n\nThe --extra-xxx=\"val\" is indeed a powerful mechanism by which any Makefile \nvariable 'XXX' (uppercase!) can be given an additional value 'val': (ab)use \nit to tweak LDFLAGS, SHLIB_LDFLAGS, etc. as needed.  Anyway if in doubt, \nor in search for exotic features, type makl-conf -h to display the complete \nlist of options: it's likely that what you are trying to achieve is already \nthere.\n\nBy default LibU is compiled as static library, to also enable shared library \nbuild, supply the --enable_shared flag.\n\n== Pick Up What Needs to be Included ==\n\nThe default is to build all the modules, but you can disable the \ninclusion of specific bits selectively using the following switches:\n    - --no_hmap: to disable the hmap module\n    - --no_config: to disable the config module\n    - --no_net: to disable the net module\n    - --no_env: to disable the env module\n    - --no_fs: to disable the fs module\n    - --no_pwd: to disable the pwd module\n    - --no_list: to disable the list module\n    - --no_array: to disable the array module\n    - --no_ringbuffer: to disable the rb module\n    - --no_pqueue: to disable the pq module\n    - --no_json: to disable the json module\n    - --no_bst: to disable the bst module\n\nAlso, some specific features regarding the networking code can be disabled\nat configuration:\n    - --no_ipv6: to disable IPv6 protocol support\n    - --no_sctp: to disable SCTP protocol support\n    - --no_unixsock: to disable UNIX IPC support\n\nIf you need to enable compatibility with (some, not all) 1.X interfaces, \nspecify the --compat_1x command line switch.\n\n== Build, Test and Install ==\n\nWhen you are done with the configure step, you can build LibU bits and \noptionally test them:\n\n$ makl\n$ makl -C test\n\n\nAnd finally install it:\n\n$ su\nPassword: ****\n# makl install\n\n\n== Hello LibU ! ==\n\nYou now are ready to play with your first LibU program:\n\n$ cat main.c\n#include \u003cu/libu.h\u003e\n\nint facility = LOG_LOCAL0;\n\nint main (void)\n{\n    u_con(\"Hello LibU world !\");\n    return 0;\n}\n\nWrite a Makefile like the following:\n\n$ cat Makefile\ninclude common.mk\n\nPROG = hellolibu\nSRCS = main.c\n\nLDADD += /path/to/install/prefix/lib/libu.a\nCFLAGS += -I/path/to/install/prefix/include\n\ninclude prog.mk\n\nThen type:\n\n$ makl \u0026\u0026 ./hellolibu\n\nand enjoy !\n","funding_links":[],"categories":["TODO scan for Android support in followings","Frameworks","C","框架"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkoanlogic%2Flibu","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkoanlogic%2Flibu","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkoanlogic%2Flibu/lists"}