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 979B0800B6 for ; Tue, 3 Jan 2017 06:54:22 +0100 (CET) Authentication-Results: mail2-smtp-roc.national.inria.fr; spf=None smtp.pra=murthy.chet@gmail.com; spf=Pass smtp.mailfrom=murthy.chet@gmail.com; spf=None smtp.helo=postmaster@mail-pg0-f50.google.com Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of murthy.chet@gmail.com) identity=pra; client-ip=74.125.83.50; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="murthy.chet@gmail.com"; x-sender="murthy.chet@gmail.com"; x-conformance=sidf_compatible Received-SPF: Pass (mail2-smtp-roc.national.inria.fr: domain of murthy.chet@gmail.com designates 74.125.83.50 as permitted sender) identity=mailfrom; client-ip=74.125.83.50; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="murthy.chet@gmail.com"; x-sender="murthy.chet@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-pg0-f50.google.com) identity=helo; client-ip=74.125.83.50; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="murthy.chet@gmail.com"; x-sender="postmaster@mail-pg0-f50.google.com"; x-conformance=sidf_compatible IronPort-PHdr: =?us-ascii?q?9a23=3AkgzCLxyErYOTDkvXCy+O+j09IxM/srCxBDY+r6Qd?= =?us-ascii?q?0eoQIJqq85mqBkHD//Il1AaPBtSHrasewLuM++C4ACpbvsbH6ChDOLV3FDY7yu?= =?us-ascii?q?wu1zQ6B8CEDUCpZNXLVAcdWPp4aVl+4nugOlJUEsutL3fbo3m18CJAUk6nbVk9?= =?us-ascii?q?Dq3PF4XTl8W60fyps92WOl0QxWn1XbQnBxyzqU31t9IKyd9pI6M1jx/IuWdgeu?= =?us-ascii?q?JMxGouK0jFzDjm4cLl155u72x1pug9998IBaDnZbg4XPpTDDk6G28w7czv8xLE?= =?us-ascii?q?SF3ctTMnTmwKn08QUED+5xbgU8K063Oiuw=3D=3D?= X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: =?us-ascii?q?A0ACAQChO2tYhjJTfUpeHRgHDBgHgwABA?= =?us-ascii?q?QEBAX6BDIUuiRucPoNRiF+CCCqHWT8UAQEBAQEBAQEBAQESAQEBCAsLCR0wgjM?= =?us-ascii?q?EARUBBIJEEwYBGx4DEiYVHwETEQEFASKIZwEDGA6ef4M/P41tGAUBHIMJBYNLC?= =?us-ascii?q?hknDVSCNQEBCAIeAgEFCQEIlTsFkAKKe4ZUi1CBD4UIgxiGQJB3MoEUH4E/hEW?= =?us-ascii?q?CClGHGIFPAQEB?= X-IPAS-Result: =?us-ascii?q?A0ACAQChO2tYhjJTfUpeHRgHDBgHgwABAQEBAX6BDIUuiRu?= =?us-ascii?q?cPoNRiF+CCCqHWT8UAQEBAQEBAQEBAQESAQEBCAsLCR0wgjMEARUBBIJEEwYBG?= =?us-ascii?q?x4DEiYVHwETEQEFASKIZwEDGA6ef4M/P41tGAUBHIMJBYNLChknDVSCNQEBCAI?= =?us-ascii?q?eAgEFCQEIlTsFkAKKe4ZUi1CBD4UIgxiGQJB3MoEUH4E/hEWCClGHGIFPAQEB?= X-IronPort-AV: E=Sophos;i="5.33,451,1477954800"; d="scan'208";a="252599009" Received: from mail-pg0-f50.google.com ([74.125.83.50]) by mail2-smtp-roc.national.inria.fr with ESMTP/TLS/AES128-GCM-SHA256; 03 Jan 2017 06:54:21 +0100 Received: by mail-pg0-f50.google.com with SMTP id f188so210935476pgc.3 for ; Mon, 02 Jan 2017 21:54:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:user-agent:mime-version :content-transfer-encoding; bh=1uvePcw6PkxtlQP+fhGHZFTAfdccQ5x2bOPbshc94hg=; b=YyqfV+y9zqQnxS1xRssQmVfxxVHb2UXG9Xt2JvG1mr5RZUFsRT8yWNU1tmARSPJfHu qReXu8qzS/GfOLTbcf/P1kQhRoC9+omK3tj50N4OHNWXs0Rb2qaf1z3A8cGbHa3KPH3B b9fkHiaGWpiD7IFjHflKj16it/DPlXG155uyAxnmwpGPBh3MKxOQRKkpXOQFZE1ASgZ6 QeCdVs5VtbBYIAEfslzkGWpah+Gk8hFpuEULpj+3I9g7V9bH/DIU6GPnShLxII2G6sXt Env4KjkBfjEEktLCW04nmS7Go3yfoRSFcxb+XjuEqC1+loPhv+lYKG0dbEjaU2Xp8KbJ mR6Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:user-agent :mime-version:content-transfer-encoding; bh=1uvePcw6PkxtlQP+fhGHZFTAfdccQ5x2bOPbshc94hg=; b=IlA8VeiMVvaWoDEUwxDivig6glBrxTsTU35Pyibas+W1MRBt9dzOyv/UDMfNz0D+/n BCtljZ6lzCmbmZD09w9XGvebuwEWF9IQkipEIr5C+YbxaVLZFZWZvmDRX/j9G84WliAE ioI1cFhWQBLCFNVBb1oDG8LLO0Yfdi/A4DBYVqW/oTC3GAdeAofy+qBA39SyGx7N6xeS bfM/zpAkr7u3QVL5byB797qCUfQOJJlHEi6Tm4+1dEm7qVf+hJI8RVQf7OFp2bPUKwTZ DXurPZCRlXZqQzBVGb2Gs/XPfVwLak4BfSkZOHca50IegoGlyKr6uSg0ozcZUgFS3vZ/ HDiA== X-Gm-Message-State: AIkVDXIPT6giI1Vc2vM+/BhZisz9r7niKyuVkp3wDnLF+aln0kZtJAUo0Oo7gAARtPsx3A== X-Received: by 10.99.175.69 with SMTP id s5mr112620863pgo.6.1483422859462; Mon, 02 Jan 2017 21:54:19 -0800 (PST) Received: from twitter.localnet (76-218-205-85.lightspeed.sntcca.sbcglobal.net. [76.218.205.85]) by smtp.gmail.com with ESMTPSA id r88sm136313842pfe.93.2017.01.02.21.54.18 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 02 Jan 2017 21:54:18 -0800 (PST) From: Chet Murthy To: Caml List Date: Mon, 02 Jan 2017 21:54:17 -0800 Message-ID: <7033084.csZPQNGq1J@twitter> User-Agent: KMail/5.1.3 (Linux/4.4.0-57-generic; KDE/5.18.0; x86_64; ; ) MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Subject: [Caml-list] C++ for Ocaml FFI bindings Hi, I've been watching the discussions over the years regarding FFI bindings from Ocaml. I've built a ton of such bindings using Camlidl. I've used some done using Ctypes. And it's always hard. But recently, I've come to the conclusion that bindings against C++ would be (shockingly, yes I know) -easier- than against C. To demonstrate this, and because I had need of it, I've writte a little IDL compiler, along with an example FFI wrappering of the C++ Rocksdb API. Only as an example. The code is raw, and really .... raw. But it works, works well, and is dreamily easy to add new entry-points to. I'm hoping that over the next few weeks, as I use this, I'll add tests, more examples, and documentation. --> oboy, does it need documentation (if anybody but me is -ever- gonna use it) Right now though, I just thought I'd send this note, to try to raise the subject that .... Maybe C++ is a ripe target for FFIs from Ocaml? I've released the code (such as it is) on Github: https://github.com/chetmurthy/ocaml-cppffigen https://github.com/chetmurthy/ocaml-rocksdb Please don't take this as an advertisement for the code. But do take it as an advertisement for the -idea-. Cheers, --chet--