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 mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr [192.134.164.83]) by yquem.inria.fr (Postfix) with ESMTP id 341E2BBAF for ; Wed, 3 Feb 2010 16:47:39 +0100 (CET) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AsYBALspaUvRVdvUkGdsb2JhbACRLolWPQEBAQEJCQwHEwOtN4FJhTiIbwEBAwWEQAQ X-IronPort-AV: E=Sophos;i="4.49,399,1262559600"; d="scan'208";a="42913244" Received: from mail-ew0-f212.google.com ([209.85.219.212]) by mail2-smtp-roc.national.inria.fr with ESMTP; 03 Feb 2010 16:47:37 +0100 Received: by ewy4 with SMTP id 4so1175264ewy.7 for ; Wed, 03 Feb 2010 07:47:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:from:content-type :content-transfer-encoding:subject:date:message-id:to:mime-version :x-mailer; bh=cgXwbfaVfIBL9iYDFIqE/S8VaVzJfCF6YU5Zmcff1Ng=; b=flwRINnTY6VoyN5s8pQQltG+9WVYAGMwhfZZe5UOKfbNvTOAeFcXsOWCf6Rhe+J7H4 8komEq/csSNS1p2l26Gw/c+k93tn+3ViSXjEVHJ/QyYozV19nOPn1qpKbCjX8IKOQwdu BBjuxty41hXTodfOteEM4bwCzD3lqU0YOWBcY= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:content-type:content-transfer-encoding:subject:date:message-id :to:mime-version:x-mailer; b=TPgSt3XWf/hi2GyiCHpsbjGmei09Xg+MsGvWM120Ab5Zw85fWf+poptVBN/50dpsM7 ocmmwI2pHWXor8b9I4kUXPFJbBsC9x14fhBTm/SeXIi4mKklx0HiGNYLqrTA+HPOORcw d2h1v2F8r9OS6QH52xlr8Lzy+Ki1q//D+Bt1w= Received: by 10.213.37.206 with SMTP id y14mr7421277ebd.4.1265212056427; Wed, 03 Feb 2010 07:47:36 -0800 (PST) Received: from ?10.10.30.6? (101.Red-88-7-136.staticIP.rima-tde.net [88.7.136.101]) by mx.google.com with ESMTPS id 16sm5483498ewy.10.2010.02.03.07.47.35 (version=TLSv1/SSLv3 cipher=RC4-MD5); Wed, 03 Feb 2010 07:47:36 -0800 (PST) From: Joel Reymont Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Subject: vm in ocaml Date: Wed, 3 Feb 2010 15:47:32 +0000 Message-Id: To: caml-list@yquem.inria.fr Mime-Version: 1.0 (Apple Message framework v1077) X-Mailer: Apple Mail (2.1077) X-Spam: no; 0.00; ocaml:01 ocaml:01 bytecode:01 bytecode:01 runtime:01 runtime:01 ocamlc:01 prompts:98 output:02 checking:02 dll:02 dll:02 executable:03 embedding:03 library:03 I have a translator from a Pascal-like trading language written in OCaml = and I need the output to run as a DLL embedded in a trading platform.=20 I'm thinking of generating bytecode and have the user pass the path to = the bytecode file to the DLL during initialization.=20 I don't want to load source code into my runtime since I want to do a = lot of error checking on it to make sure the runtime experience is = smooth. I don't want to ship ocamlc, etc. since I want to have a single = executable. I'm not sure if embedding OCaml (and thus a license!) is = needed to generate OCaml bytecode in my scenario, so the bytecode I'm = talking about is my bytecode. I understand that a bit of C will be required to wrap the OCaml runtime = in a DLL. I would prefer to stay with OCaml for the whole project which = prompts my question...=20 Has anyone used OCaml to write a virtual machine? How big is the OCaml runtime when bundled as a DLL or shared library? Thanks, Joel --- http://es.linkedin.com/in/joelreymont