Welcome to SwiftChannel, a high-performance inter-process communication library!
This index helps you navigate the project structure and find what you need quickly.
| Document | Purpose | Target Audience |
|---|---|---|
| README.md | Project overview & quick start | Everyone |
| QUICK_REFERENCE.md | API cheat sheet & patterns | Developers |
| GETTING_STARTED.md | Comprehensive user guide | New users |
| ARCHITECTURE.md | Technical deep dive | Advanced users |
| PROJECT_SUMMARY.md | Complete framework overview | Contributors |
...get started immediately β Read QUICK_REFERENCE.md (5 minutes)
...understand the architecture β Read ARCHITECTURE.md (20 minutes)
...build the project
β Run verify_build.sh (Linux/Mac) or verify_build.bat (Windows)
...see examples β Check examples/ directory
...run tests
β Build and run ctest -C Release
...integrate into my project β See "Integration" section in GETTING_STARTED.md
...contribute β Read ARCHITECTURE.md and PROJECT_SUMMARY.md
- CMakeLists.txt - Main build configuration
- verify_build.sh / verify_build.bat - Build verification scripts
- LICENSE - MIT License
- .gitignore - Git ignore rules
Build system configuration
- compiler_options.cmake - Compiler flags & optimizations
- SwiftChannelConfig.cmake.in - Package config template
Public API (these are what you include in your code)
Core types and utilities
- types.hpp -
MessageHeader,SharedMemoryHeader, type aliases - error.hpp -
ErrorCode,Result<T>, error handling - version.hpp - Version management
- alignment.hpp - Cache-line alignment utilities
Fast-path sending (no linking required!)
- sender.hpp - Main
Senderclass with inlinesend() - channel.hpp -
Channelabstraction - message.hpp -
Message<T>,DynamicMessagewrappers - ring_buffer.hpp - Lock-free SPSC ring buffer
- config.hpp -
ChannelConfigstructure
Receiver API (requires linking)
- receiver.hpp -
Receiverclass declaration
Compiled implementation (builds into libswiftchannel)
Receiver implementation
- receiver.cpp - Main receiver logic
- receiver_impl.hpp - Private implementation
- dispatch.cpp - Message dispatch
Compiled sender parts
- channel_impl.cpp - Channel lifecycle management
IPC infrastructure
- shared_memory.{hpp,cpp} - Shared memory abstraction
- handshake.{hpp,cpp} - Protocol handshake & versioning
Platform-specific implementations
/src/platform/windows/ - Windows support
- platform_win.hpp - Windows utilities
- shm_win.cpp - Named File Mapping implementation
- pipe_win.cpp - Named pipes (future)
/src/platform/posix/ - POSIX support (Linux/macOS)
- platform_posix.hpp - POSIX utilities
- shm_posix.cpp - POSIX shm_open implementation
- socket_posix.cpp - Unix sockets (future)
Statistics & monitoring
- stats.{hpp,cpp} - Statistics tracking
Test suite
- CMakeLists.txt - Test build configuration
- unit/ring_buffer_test.cpp - Ring buffer tests
- unit/message_test.cpp - Message type tests
- integration/sender_receiver_test.cpp - End-to-end test
Example applications
- CMakeLists.txt - Examples build configuration
- simple_sender/main.cpp - Basic sender example
- simple_receiver/main.cpp - Basic receiver example
Diagnostic tools
- ipc_inspector/main.cpp - Channel inspector
What to include:
#include <swiftchannel/swiftchannel.hpp>What to link:
- Nothing! It's header-only for senders.
Files to read:
- QUICK_REFERENCE.md - API reference
- include/swiftchannel/sender/sender.hpp - API details
Example:
What to include:
#include <swiftchannel/swiftchannel.hpp>
#include <swiftchannel/receiver/receiver.hpp>What to link:
libswiftchannel.a(orswiftchannel.libon Windows)
Files to read:
- QUICK_REFERENCE.md - API reference
- include/swiftchannel/receiver/receiver.hpp - API details
Example:
Files to read (in order):
- README.md - Overview
- ARCHITECTURE.md - Detailed design
- include/swiftchannel/sender/ring_buffer.hpp - Lock-free implementation
- src/platform/windows/shm_win.cpp or src/platform/posix/shm_posix.cpp - Platform specifics
Key extension points:
- Platform support: Add new directory in
src/platform/ - Message dispatch: Extend
src/receiver/dispatch.cpp - Statistics: Extend
src/diagnostics/stats.{hpp,cpp} - Configuration: Add fields to
ChannelConfigininclude/swiftchannel/sender/config.hpp
Files to read:
- PROJECT_SUMMARY.md - Complete overview
- ARCHITECTURE.md - Design rationale
β include/swiftchannel/sender/ring_buffer.hpp
β src/ipc/shared_memory.hpp (interface) β src/platform/windows/shm_win.cpp (Windows impl) β src/platform/posix/shm_posix.cpp (POSIX impl)
β include/swiftchannel/common/error.hpp
β include/swiftchannel/common/types.hpp (headers) β include/swiftchannel/sender/message.hpp (wrappers)
β src/ipc/handshake.{hpp,cpp}
β cmake/compiler_options.cmake
β Implemented in ring_buffer.hpp
β Atomic operations in ring_buffer.hpp
β Utilities in alignment.hpp
β All sender code in include/swiftchannel/sender/
- Ring buffer: tests/unit/ring_buffer_test.cpp
- Messages: tests/unit/message_test.cpp
- End-to-end: tests/integration/sender_receiver_test.cpp
cd build
ctest -C Release --verboseβ CMakeLists.txt
β cmake/compiler_options.cmake
β cmake/SwiftChannelConfig.cmake.in
- Linux/Mac: verify_build.sh
- Windows: verify_build.bat
- Run
verify_build.shorverify_build.bat - Read QUICK_REFERENCE.md
- Copy examples/simple_sender/main.cpp
- Start coding!
β See "Best Practices" section in GETTING_STARTED.md
β See "Performance Tuning" section in GETTING_STARTED.md
β See "Troubleshooting" section in QUICK_REFERENCE.md
- β Read README.md
- β Run verify_build.sh
- β Study examples/simple_sender/main.cpp
- β Read QUICK_REFERENCE.md
- β Write your first sender app
- β Read GETTING_STARTED.md
- β Study examples/simple_receiver/main.cpp
- β Write a receiver app
- β Experiment with configuration options
- β Run benchmarks
- β Read ARCHITECTURE.md
- β Study ring_buffer.hpp
- β Read platform-specific code
- β Profile your application
- β Consider contributing
- Read PROJECT_SUMMARY.md
- Read ARCHITECTURE.md
- Study the existing code
- Run all tests
- Additional platform support
- Performance optimizations
- More examples
- Documentation improvements
- Bug fixes
- Start with README.md
- Check QUICK_REFERENCE.md for API
- Read GETTING_STARTED.md for details
- Check troubleshooting in QUICK_REFERENCE.md
- Review GETTING_STARTED.md troubleshooting section
- Total Files: 47+
- Lines of Code: ~5,000+ (headers + implementation)
- Documentation: ~3,000+ lines
- Languages: C++20
- Platforms: Windows, Linux, macOS
- License: MIT
- Build the project: Run
verify_build.shorverify_build.bat - Learn the API: Read QUICK_REFERENCE.md
- Run examples: Try
examples/simple_senderandexamples/simple_receiver - Start coding: Copy examples and modify for your use case
- Optimize: Read performance tips in GETTING_STARTED.md
Happy coding with SwiftChannel! π
For questions or issues, refer to the documentation files listed above.