code
Clone this repository
https://tangled.org/gdiazlo.tngl.sh/swim
git@tangled.org:gdiazlo.tngl.sh/swim
For self-hosted knots, clone URLs may differ based on your setup.
- Implement pure OCaml LZW decompression (LSB order, litWidth=8)
- Handle Compress_msg (type 9) in TCP connection handler
- Re-enable compression in Go memberlist (default behavior)
- Add LZW unit tests verifying Go-compatible decompression
This enables full interoperability with memberlist's default
compressed pushPull messages during Join().
- Add TCP listener creation in transport.ml and protocol.ml
- Implement pushPull message handling for TCP state sync
- Add push_pull_header and push_node_state types to Wire module
- Add encode/decode functions for pushPull messages in codec.ml
- Wire up TCP listener fiber in swim.ml Cluster.start
- Disable compression in Go interop test (memberlist uses LZ4)
This enables Go memberlist nodes to Join() to our OCaml SWIM cluster
via TCP pushPull state exchange.
- Use encryption version 1 (no PKCS7 padding) for outgoing messages
- Support decrypting both version 0 (with PKCS7) and version 1
- Add --encrypt flag to interop_test for encrypted testing
- Add test_interop_encrypted.sh for encrypted interop testing
Verified: OCaml SWIM ↔ Go memberlist encrypted ping/ack works.
- Refactor encode/decode functions to use Cstruct buffers directly
- Add *_to_cstruct and *_from_cstruct variants for all codec functions
- Fix compound message encoding bug: create fresh buffer per message
- Add backward-compatible string wrappers for tests
All tests pass including codec roundtrip property tests and Go interop.
- Add interop/main.go: Go memberlist server for testing
- Add bin/debug_*.ml: OCaml debug tools for codec/ping testing
- Add test_interop.sh: script to run interop test
- Update .gitignore for compiled binaries