From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from mail3-relais-sop.national.inria.fr (mail3-relais-sop.national.inria.fr [192.134.164.104]) by yquem.inria.fr (Postfix) with ESMTP id B160DBC57 for ; Fri, 9 Jul 2010 09:07:12 +0200 (CEST) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AuwBAOtnNkzRVda0mGdsb2JhbACgLwgVAQEBAQEICQwHESKwBoVdiQEBAQMFhSIEiEmHNg X-IronPort-AV: E=Sophos;i="4.53,562,1272837600"; d="scan'208";a="53860709" Received: from mail-iw0-f180.google.com ([209.85.214.180]) by mail3-smtp-sop.national.inria.fr with ESMTP; 09 Jul 2010 09:06:50 +0200 Received: by iwn8 with SMTP id 8so2397056iwn.39 for ; Fri, 09 Jul 2010 00:06:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:mime-version:sender:received :in-reply-to:references:from:date:x-google-sender-auth:message-id :subject:to:cc:content-type; bh=kMGPxQUDZvQk77blAMrOgjs4vPSP4uP4CqbUdRAzBdY=; b=WLDzpd/JWVkuDbXIU3EkPR6MoJkAUIkRhfN+UHwi11bncEVvXgRLNbun6yV7MOfHQR J1XkhrKIRrqPI3xT4Rs9ecG7/92dzeSX7cs5ggdnlOGxfJ9TwDn23mVixrbc1BfFcTpX cJ4vDybut3LXuCKow1zI6sTWDJeTRq1oWepms= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:cc:content-type; b=Gbr4dxU8MpURSczZWmTmd6C1F8gR/rZ+VV2xXLsbmkZcU6Wrgb1j3Ae8xKToeUx/x3 VpvPdCwnds7krbF7u0R6p9eJkkGWupeWpbyXOTt6S5ZS4hiFQtA0ujJ7g0zjE1lkuZaf bMHGV+ahU9Ej2N97Nh+wEaZIGCZL21GE/H7YY= Received: by 10.231.167.69 with SMTP id p5mr10040740iby.126.1278659209658; Fri, 09 Jul 2010 00:06:49 -0700 (PDT) MIME-Version: 1.0 Sender: david.mentre@gmail.com Received: by 10.231.208.73 with HTTP; Fri, 9 Jul 2010 00:06:29 -0700 (PDT) In-Reply-To: References: From: David MENTRE Date: Fri, 9 Jul 2010 09:06:29 +0200 X-Google-Sender-Auth: L7GJHOD-_JkPtrEyfyaeZuoH3ZA Message-ID: Subject: Re: [Caml-list] ocaml for embedding To: Gaspard Bucher Cc: caml-list@yquem.inria.fr Content-Type: text/plain; charset=ISO-8859-1 X-Spam: no; 0.00; ocaml:01 ocaml:01 compiler:01 callable:01 compiler:01 byte:01 caml-list:01 caml:02 string:02 native:03 embedding:03 std:03 compiled:04 passing:05 manual:06 Hello, 2010/7/8 Gaspard Bucher : > 1. Is it possible to embed an ocaml compiler ? (something that eats > std::string and produces a callable thing) No, not the compiler. It is however possible to embed an interpreter and to load byte code (and native code?) on demand: http://caml.inria.fr/pub/docs/manual-ocaml/manual032.html#toc134 > 2. How would an interface between C++ and a compiled script work ? (passing > values, getting return values) Through a C interface. See above link. Sincerely yours, david