SpaceOS wire protocol codecs for host-guest communication
1(** Generate EverParse C parsers and differential test infrastructure for
2 SpaceOS Wire codecs. Uses [wire.diff-gen] for the heavy lifting. *)
3
4let schemas =
5 List.filter_map
6 (fun (name, module_) ->
7 match List.assoc_opt name Space_wire_3d.all_structs with
8 | Some struct_ -> Wire_diff_gen.Diff_gen.schema ~name ~struct_ ~module_
9 | None -> None)
10 Space_wire_3d.all_modules
11
12let () =
13 let schema_dir =
14 if Array.length Sys.argv > 1 then Sys.argv.(1) else "schemas"
15 in
16 Wire_diff_gen.Diff_gen.generate ~schema_dir ~outdir:"." schemas