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 F00847EE4B for ; Sun, 29 Sep 2013 21:51:07 +0200 (CEST) Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of mmatalka@gmail.com) identity=pra; client-ip=209.85.212.175; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="mmatalka@gmail.com"; x-sender="mmatalka@gmail.com"; x-conformance=sidf_compatible Received-SPF: Pass (mail2-smtp-roc.national.inria.fr: domain of mmatalka@gmail.com designates 209.85.212.175 as permitted sender) identity=mailfrom; client-ip=209.85.212.175; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="mmatalka@gmail.com"; x-sender="mmatalka@gmail.com"; x-conformance=sidf_compatible; x-record-type="v=spf1" Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of postmaster@mail-wi0-f175.google.com) identity=helo; client-ip=209.85.212.175; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="mmatalka@gmail.com"; x-sender="postmaster@mail-wi0-f175.google.com"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AkUCANGDSFLRVdSvlWdsb2JhbABZgmbCIoEgFg4BAQEBBw0JCRIqgiUBAQQBQAEbHQEDAQsGBQsNCSUPAQQNAhEBBQEiExuHWAEDCQYBnVWMUoMKg2oKGScNZIkAAQUMjFqCaweEIgOWFoFpijmCDINKQYRN X-IPAS-Result: AkUCANGDSFLRVdSvlWdsb2JhbABZgmbCIoEgFg4BAQEBBw0JCRIqgiUBAQQBQAEbHQEDAQsGBQsNCSUPAQQNAhEBBQEiExuHWAEDCQYBnVWMUoMKg2oKGScNZIkAAQUMjFqCaweEIgOWFoFpijmCDINKQYRN X-IronPort-AV: E=Sophos;i="4.90,1005,1371074400"; d="scan'208";a="34804250" Received: from mail-wi0-f175.google.com ([209.85.212.175]) by mail2-smtp-roc.national.inria.fr with ESMTP/TLS/RC4-SHA; 29 Sep 2013 21:51:06 +0200 Received: by mail-wi0-f175.google.com with SMTP id ez12so2891244wid.2 for ; Sun, 29 Sep 2013 12:51:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-type; bh=TZ1tZhVPnbuYO9XhxEbH+eUVm//ZREVSDqediQN+3rg=; b=B9T+fj4GJtX75HQ/RR3BlLjAlUBvcy+Q9cfH2aDoid9A/qGSIVhMIScwCwAeVG7bR2 fNB30JuT7WpIIh7VNG3fu0zpydxhpzg5xUVptfJS6R2KH8A0hP/yJywsXhHZGiXPL3pv K7lMOmRKILnMSa1miZgXckdmAADfco0mUDZOyJ+ksZQdphqwPqPqjTdfeQ8eX4IWu2v0 2bM8F/TOPnQmlmF6qj0iLyhtmdRYc/HRg6HKS2Oh8U8rMS/LOGtA11OZ7oDeEDG6nLVq bhpSnKZCEYA606P6chx8VybmufyUW+HKtzn3/webPyvwraLk4V1AbPDs+P4fahHj14ze RGBA== X-Received: by 10.195.13.164 with SMTP id ez4mr14648899wjd.11.1380484267002; Sun, 29 Sep 2013 12:51:07 -0700 (PDT) Received: from localhost ([2a01:7e00::f03c:91ff:fe70:2696]) by mx.google.com with ESMTPSA id jf2sm18817518wic.2.1969.12.31.16.00.00 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Sun, 29 Sep 2013 12:51:06 -0700 (PDT) From: Malcolm Matalka To: Anil Madhavapeddy Cc: Ocaml Mailing List References: <8738on1koe.fsf@gmail.com> Date: Sun, 29 Sep 2013 19:51:05 +0000 In-Reply-To: (Anil Madhavapeddy's message of "Sun, 29 Sep 2013 20:43:01 +0100") Message-ID: <87y56fz9sm.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain Subject: Re: [Caml-list] embedding js_of_ocaml output? Awesome! Thank you! Anil Madhavapeddy writes: > 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