HomeKit Accessory Protocol (HAP) for OCaml
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Migrate from vendored crowbar to opam-pinned alcobar

- Remove vendored crowbar/ directory
- Replace all Crowbar references with Alcobar across 176 .ml files
- Update all fuzz dune files: crowbar → alcobar in libraries
- Remove 77 gen_corpus.ml files (alcobar handles corpus internally)
- Update dune-project files: crowbar → alcobar in dependencies
- Update merlint rules (e705, e726): Crowbar → Alcobar in checks,
docs, and examples
- Update merlint generated docs (index.html)

428 files changed, ~1200 lines removed net.

+5 -34
+2 -8
fuzz/dune
··· 6 6 (executable 7 7 (name fuzz) 8 8 (modules fuzz fuzz_hap) 9 - (libraries hap crowbar)) 10 - 11 - (executable 12 - (name gen_corpus) 13 - (modules gen_corpus) 14 - (libraries unix)) 9 + (libraries hap alcobar)) 15 10 16 11 (rule 17 12 (alias runtest) ··· 27 22 (= %{profile} afl)) 28 23 (deps 29 24 (source_tree corpus) 30 - fuzz.exe 31 - gen_corpus.exe) 25 + fuzz.exe) 32 26 (action 33 27 (echo "AFL fuzzer built: %{exe:fuzz.exe}\n")))
+1 -1
fuzz/fuzz.ml
··· 1 - let () = Crowbar.run "hap" [ Fuzz_hap.suite ] 1 + let () = Alcobar.run "hap" [ Fuzz_hap.suite ]
+1 -1
fuzz/fuzz_hap.ml
··· 3 3 SPDX-License-Identifier: MIT 4 4 ---------------------------------------------------------------------------*) 5 5 6 - open Crowbar 6 + open Alcobar 7 7 8 8 (* TLV roundtrip: encode(decode(x)) should produce valid TLV *) 9 9 let test_tlv_decode_encode input =
+1 -1
fuzz/fuzz_hap.mli
··· 1 1 (** Fuzz tests for {!Hap}. *) 2 2 3 - val suite : string * Crowbar.test_case list 3 + val suite : string * Alcobar.test_case list 4 4 (** Test suite. *)
-23
fuzz/gen_corpus.ml
··· 1 - (** Generate seed corpus for HAP TLV fuzz testing. *) 2 - 3 - let () = 4 - (try Unix.mkdir "corpus" 0o755 5 - with Unix.Unix_error (Unix.EEXIST, _, _) -> ()); 6 - let write name data = 7 - let oc = open_out_bin (Filename.concat "corpus" name) in 8 - output_string oc data; 9 - close_out oc 10 - in 11 - (* Empty input *) 12 - write "seed_000" ""; 13 - (* Single TLV: type=0x01, length=3, value="abc" *) 14 - write "seed_001" "\x01\x03abc"; 15 - (* Multiple TLV entries *) 16 - write "seed_002" "\x01\x02hi\x02\x05world"; 17 - (* TLV with zero-length value *) 18 - write "seed_003" "\x01\x00"; 19 - (* Large type byte *) 20 - write "seed_004" "\xff\x01x"; 21 - (* Truncated TLV (length exceeds data) *) 22 - write "seed_005" "\x01\xff"; 23 - print_endline "Generated 6 seed files in corpus/"