Sponge
CS144 Lab Assignments
Install / Use
/learn @vikshanker/SpongeREADME
For build prereqs, see the CS144 VM setup instructions.
Sponge quickstart
To set up your build directory:
$ mkdir -p <path/to/sponge>/build
$ cd <path/to/sponge>/build
$ cmake ..
Note: all further commands listed below should be run from the build dir.
To build:
$ make
You can use the -j switch to build in parallel, e.g.,
$ make -j$(nproc)
To test (after building; make sure you've got the build prereqs installed!)
$ make check_lab0
or
$ make check_lab1
etc.
The first time you run a make check, it may run sudo to configure two
TUN devices for use during testing.
build options
You can specify a different compiler when you run cmake:
$ CC=clang CXX=clang++ cmake ..
You can also specify CLANG_TIDY= or CLANG_FORMAT= (see "other useful targets", below).
Sponge's build system supports several different build targets. By default, cmake chooses the Release
target, which enables the usual optimizations. The Debug target enables debugging and reduces the
level of optimization. To choose the Debug target:
$ cmake .. -DCMAKE_BUILD_TYPE=Debug
The following targets are supported:
Release- optimizationsDebug- debug symbols and-OgRelASan- release build with ASan and UBSanRelTSan- release build with ThreadSanDebugASan- debug build with ASan and UBSanDebugTSan- debug build with ThreadSan
Of course, you can combine all of the above, e.g.,
$ CLANG_TIDY=clang-tidy-6.0 CXX=clang++-6.0 .. -DCMAKE_BUILD_TYPE=Debug
Note: if you want to change CC, CXX, CLANG_TIDY, or CLANG_FORMAT, you need to remove
build/CMakeCache.txt and re-run cmake. (This isn't necessary for CMAKE_BUILD_TYPE.)
other useful targets
To generate documentation (you'll need doxygen; output will be in build/doc/):
$ make doc
To lint (you'll need clang-tidy):
$ make -j$(nproc) tidy
To run cppcheck (you'll need cppcheck):
$ make cppcheck
To format (you'll need clang-format):
$ make format
To see all available targets,
$ make help
Related Skills
node-connect
343.3kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
92.1kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
343.3kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
343.3kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
Security Score
Audited on Jan 20, 2026
