Skip to content

Latest commit

 

History

History
43 lines (31 loc) · 853 Bytes

File metadata and controls

43 lines (31 loc) · 853 Bytes

Contributing to x-optimizer

Development

Build

make clean && make

Debug build with sanitizers

make debug

Testing

./build/xoptimizer -s /tmp/xopt.sock -r test_rules.txt

Code style

  • C11 standard
  • POSIX-compliant
  • Use meaningful variable names
  • Keep functions focused and small
  • Document complex algorithms with comments

Performance considerations

  • Minimize memory allocations in hot paths
  • Prefer linear data structures over arrays for sparse data
  • Use const for immutable data
  • Profile before optimizing

Testing before submitting

  1. Verify no build warnings: make CFLAGS="-Wall -Wextra -Wpedantic"
  2. Test with AddressSanitizer: make debug
  3. Check with memory profiler: valgrind ./build/xoptimizer

License

All contributions are licensed under the MIT License.