Top 10 C open-source projects worth the attention of programmers

Source: Internet
Author: User

  1. webshells

Webbench is a simple website stress testing tool used in Linux. It uses fork () to simulate multiple clients simultaneously accessing our set URL and test the performance of the website under pressure. It can simulate up to 30 thousand concurrent connections to test the load capacity of the website. Webbench is written in C language. The code is too concise and the source code is less than 600 lines.

Http://home.tiscali.cz /~ Cz210552/webbench.html

  2. tinyhttpd

Tinyhttpd is a lightweight HTTP server. It is developed in C language and has only 502 lines of code (including comments). With a simple client, you can read this code to understand the nature of an HTTP server.

Download link: http://sourceforge.net/projects/tinyhttpd/

  3. cjson

Cjson is a JSON decoder in C language. It is very lightweight and has only over 500 lines of C files, and the speed is also ideal.

Cjson also has several weaknesses. Although its functions are not very powerful, cjson's slimming board and speed are the most commendable. Its code is well maintained and its structure is easy to understand. It can be learned as a very good C Language Project.

Project home: http://sourceforge.net/projects/cjson/

  4. cmockery

Cmockery is a lightweight framework released by Google for Unit C testing. It is very small and has no dependency on other open-source packages, and has little intrusion to the tested code. The number of lines in the source code of cmockery is less than 3 K. You can read the source code of will_return and mock at a glance.

Main features:

  1. Free and open-source. Google provides technical support;
  2. A lightweight framework makes testing faster and easier;
  3. Avoid using complex compiler features. It is compatible with earlier compilers;
  4. It is not mandatory that the code to be tested must rely on the c99 standard. This feature is useful for the development of many embedded systems.

Download link: http://code.google.com/p/cmockery/downloads/list

  5. libev

Libev is an open-source event-driven Library Based on the infrastructure provided by epoll, kqueue, and other operating systems. It is famous for its efficiency. It can unify Io events, timers, and signals and put them under the framework of event processing. Based on the reactor mode, it is highly efficient and the code is streamlined (more than 4.15 lines in version 8000). It is a good resource for learning event-driven programming.

Download link: http://software.schmorp.de/pkg/libev.html

  6. memcached

Memcached is a high-performance distributed memory object Cache System for dynamic web applications to reduce database load. It caches data and objects in the memory to reduce the number of times the database is read, so as to provide dynamic database-driven website speed. Memcached is based on a hashmap that stores key/value pairs. The amount of Memcached-1.4.7 code is acceptable, only about 10 k lines.

: Http://memcached.org/

  7. Lua

Lua is great. Lua was invented by Brazilian people. I am not happy with it, but it is not blushing.

What blushes me is the Lua source code, 100% ansi c, which is not mixed at all. It can be easily compiled on any platform that supports the ansi c compiler. I have tried it. It's really nonsense. The number of Lua codes is small enough, and 5.1.4 only contains 1.5 million lines. It is estimated that the number of blank lines and comments can reach 1 million lines.

: Http://www.lua.org/

  8. SQLite

SQLite is an open-source embedded relational database engine that supports self-contained, zero-configuration, and transactions. It is highly portable, easy to use, compact, efficient, and reliable. Small enough, roughly 30 thousand lines of C code, 250 K.

: Http://www.sqlite.org /.

  9. UNIX v6

The kernel source code of UNIX V6 contains about 10 thousand lines including the device driver. This quantity of source code can be fully understood by beginners. One argument is that the maximum number of lines of code that a person can understand is 10 thousand. The number of kernel source codes of UNIX V6 is within this range. Do you have the idea of "I can learn it if there are only 10 thousand rows?

On the other hand, the latest operating system, such as the latest Linux kernel source code, is said to exceed 10 million lines. Even if you are not a beginner, it is basically impossible to fully understand all the code.

: Http://minnie.tuhs.org/cgi-bin/utree.pl? File = v6

  10. NetBSD

NetBSD is a free and highly portable Unix-like operating system. It is the most portable operating system on many platforms, from 64-bit Alpha servers to handheld devices and embedded devices. The NetBSD program's slogan is "Of course it runs NetBSD ". It has simple design, code specifications, and many advanced features, making it widely acclaimed in the industry and academia. Thanks to its concise design and advanced features, it has excellent performance in terms of production and research, and it also has complete source code supported by users. Many programs can be easily obtained through the NetBSD packages collection.

: Http://www.netbsd.org/

Top 10 C open-source projects worth the attention of programmers

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.