Skip to content

remove Str module #663

@hannesm

Description

@hannesm

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:

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions