From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr [192.134.164.83]) by sympa.inria.fr (Postfix) with ESMTPS id 0A32E7EE4B for ; Sun, 29 Sep 2013 21:43:05 +0200 (CEST) Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of anil@recoil.org) identity=pra; client-ip=89.16.177.154; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="anil@recoil.org"; x-sender="anil@recoil.org"; x-conformance=sidf_compatible Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of anil@recoil.org) identity=mailfrom; client-ip=89.16.177.154; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="anil@recoil.org"; x-sender="anil@recoil.org"; x-conformance=sidf_compatible Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of postmaster@dark.recoil.org) identity=helo; client-ip=89.16.177.154; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="anil@recoil.org"; x-sender="postmaster@dark.recoil.org"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AjUBAGiBSFJZELGal2dsb2JhbABYsQ6TeoE2DgEBAQEBCBYHPIIlAQEEATo/BQsLDjghNgYTG4dZAwkKsWINiWqMZoJrB4MfgQMDlhaBaYo5ggyIWTs X-IPAS-Result: AjUBAGiBSFJZELGal2dsb2JhbABYsQ6TeoE2DgEBAQEBCBYHPIIlAQEEATo/BQsLDjghNgYTG4dZAwkKsWINiWqMZoJrB4MfgQMDlhaBaYo5ggyIWTs X-IronPort-AV: E=Sophos;i="4.90,1005,1371074400"; d="scan'208";a="34803800" Received: from recoil.dh.bytemark.co.uk (HELO dark.recoil.org) ([89.16.177.154]) by mail2-smtp-roc.national.inria.fr with SMTP; 29 Sep 2013 21:43:03 +0200 Received: (qmail 31732 invoked by uid 634); 29 Sep 2013 19:43:04 -0000 X-Spam-Level: * X-Spam-Check-By: dark.recoil.org Received: from cpc7-cmbg14-2-0-cust238.5-4.cable.virginmedia.com (HELO [192.168.1.62]) (86.30.244.239) (smtp-auth username remote@recoil.org, mechanism cram-md5) by dark.recoil.org (qpsmtpd/0.84) with ESMTPA; Sun, 29 Sep 2013 20:43:03 +0100 Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 7.0 \(1811\)) From: Anil Madhavapeddy In-Reply-To: <8738on1koe.fsf@gmail.com> Date: Sun, 29 Sep 2013 20:43:01 +0100 Cc: Ocaml Mailing List Content-Transfer-Encoding: 7bit Message-Id: References: <8738on1koe.fsf@gmail.com> To: Malcolm Matalka X-Mailer: Apple Mail (2.1811) X-Virus-Checked: Checked by ClamAV on dark.recoil.org Subject: Re: [Caml-list] embedding js_of_ocaml output? On 29 Sep 2013, at 20:40, Malcolm Matalka wrote: > This might be a really trivial question but perusing the js_of_ocaml > website I didn't see it answered: > > Has anyone gone about embedding js_of_ocaml in an ocaml application? > Specifically, I want ship a binary that runs a small embedded webserver > and provides the GUI over that. The obvious solution is just to add > building the js_of_ocaml output in the build process then make a fake > module that just has a string with the output in it and compile that in. > Hacky but I don't see why it wouldn't work but I'm sure somebody has a > clever idea out there. 'crunch' from OPAM will do what you want: $ opam search crunch Available packages for system: crunch -- Convert a filesystem into a static OCaml module (let me know if there's anything in there that's Mirage specific and I'll fix it). I believe 'ocamlify' also does the same thing from OASIS, but I've not used it. $ opam search ocamlify Available packages for system: ocamlify 0.0.1 Include files in OCaml code -anil