The top 10 C-language open-source project codes and open-source project codes worth reading and learning

Source: Internet
Author: User

The top 10 C-language open-source project codes and open-source project codes worth reading and learning
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:

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 rows. It is estimated that the number of blank lines and comments can reach rows. : Http://www.lua.org/

8. SQLite

SQLite is an open-source embedded Relational Database Engine for SQL database with self-contained, zero configuration, and transaction support. 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/


I want to learn the C language and have a programming foundation. I am a beginner. I downloaded the source code of an open-source project. I don't know how to compile it.

It is unrealistic to raise this question upstairs. If you have time to teach you free of charge, do you have to pay 50 RMB to study on your own, visit the Forum and watch the teaching video! If you have encountered some problems, you can ask questions in the forum. There are still many enthusiastic netizens on the Internet!
 
I am a beginner of C language. I have several years of PHP/Java Development Experience. Now I want to recommend an open-source project suitable for beginners of C.

Find it on SourceForge.

Related Article

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.