-
Notifications
You must be signed in to change notification settings - Fork 263
remove Str module #663
Description
The OCaml distribution provides, as part of otherlibs, a module called Str which has some regular expression implementation. There are parts of this implementation written in C, and it seems to be kind of out of fashion (a very imperative implementation).
Luckily there are alternatives, on the one side astring, and if you need full regular expressions there is the fine re library written purely in OCaml.
The mirage.runtime ocamlfind package, which is part of every MirageOS unikernel, embeds next to logs also astring. For simple string processing (such as split), there is no need to use the big regular expression hammer anymore.
I removed the strstubs from being part of the OCaml runtime shipped for MirageOS unikernels. In case your unikernel uses Str, it will be a link-time error -- this is how Travis found the occurence of Str in the dhcp example. Please consider the following PRs:
- use Astring instead of Str in dhcp example mirage-skeleton#195 (adjustment to the dhcp example)
- Do not embed Str into our OCaml runtime mirage-platform#175 (mirage-xen-ocaml)
- no str stubs anymore ocaml-solo5#12 (ocaml-freestanding)
Have an informational look into mirage/mirage-dev#202 to convince yourself that Travis managed to compile mirage-skeleton with the new OCaml runtimes.
This is a breaking change and will be properly documented with the MirageOS3 release notes.