[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [MirageOS-devel] Irmin and js_of_ocaml
> Is it possible to use Irmin under js_of_ocaml? I tried it, but I got > this in the browser console at startup: > > uncaught exception: 0,0,Failure,ml_z_init not implemented > > It looks like Irmin pulls in Nocrypto (and thus zarith) only for the > SHA1.digest function. There are also lots of warnings about missing > cstruct stubs. > > I was thinking of running Irmin in the browser with HTML 5 storage as > a backend, but perhaps it would be easier to keep Irmin on the server. > Any suggestions? Basic stuff used to work in JS at one point, but not anymore: I'd be *very* interested to get the support back in good shape though. I think the shorter way is to forget about the Git format (at least for a first step) and write a custom backend for local storage: a mix between https://github.com/mirage/irmin/blob/master/lib/mem/irmin_mem.ml and https://github.com/avsm/ocaml-js-localstorage/blob/master/lib/localStorage.ml. You won't be able to sync using Git, but you can still use the custom Irmin sync protocol. Having a proper support for the Git format is a bit more involved: you indeed need nocrypto (for SHA1) and camlzip (for zlib). But being able to Git clone/push from your browser would be quite cool and crazy :-) Thomas _______________________________________________ MirageOS-devel mailing list MirageOS-devel@xxxxxxxxxxxxxxxxxxxx http://lists.xenproject.org/cgi-bin/mailman/listinfo/mirageos-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |