mirage-tcpip
mirage-tcpip copied to clipboard
jsoo support
I'd like to use mirage-tcpip in a project using JavaScript using js_of_ocaml. The only piece that is missing is an OCaml (or JavaScript) implementation of the tcp checksum calculation.
As a quick-and-dirty fix, I ported the C implementation to OCaml and it seems to be working fine: patch. It's missing a non-allocating version for the _list variant. It'll also need to be properly integrated with the build system so that the native version will be selected for native builds and the pure version of jsoo builds.
This sounds good; please do send in a PR with the JS implementation and I'll fix up the build system to integrate it.
Would it make sense to extend and use mirage/checkseum for this? /cc @dinosaure