From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@sympa.inria.fr Delivered-To: caml-list@sympa.inria.fr 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 174C6800DB for ; Wed, 8 Mar 2017 08:08:36 +0100 (CET) Authentication-Results: mail2-smtp-roc.national.inria.fr; spf=None smtp.pra=jdimino@janestreet.com; spf=Pass smtp.mailfrom=jdimino@janestreet.com; spf=None smtp.helo=postmaster@mxout3.mail.janestreet.com Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of jdimino@janestreet.com) identity=pra; client-ip=38.105.200.229; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="jdimino@janestreet.com"; x-sender="jdimino@janestreet.com"; x-conformance=sidf_compatible Received-SPF: Pass (mail2-smtp-roc.national.inria.fr: domain of jdimino@janestreet.com designates 38.105.200.229 as permitted sender) identity=mailfrom; client-ip=38.105.200.229; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="jdimino@janestreet.com"; x-sender="jdimino@janestreet.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@mxout3.mail.janestreet.com) identity=helo; client-ip=38.105.200.229; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="jdimino@janestreet.com"; x-sender="postmaster@mxout3.mail.janestreet.com"; x-conformance=sidf_compatible IronPort-PHdr: =?us-ascii?q?9a23=3AaisQYBSviJCVeuRgw2O9x6HH+tpsv+yvbD5Q0YIu?= =?us-ascii?q?jvd0So/mwa64ZRON2/xhgRfzUJnB7Loc0qyN4v2mBTdLuM7b+DBaKdoXCE9D0Z?= =?us-ascii?q?1X1yUbQ+e7SmTDZMbwaCI7GMkQHHRExFqcdXZvJcDlelfJqWez5zNBUj/2NA5y?= =?us-ascii?q?O/inUtWK15f//6mI9pbSewRFgiamKfM3dU3u7FaZis5DqI1uMKt57BLVonJOM7?= =?us-ascii?q?Bfw29yKHqfnhn9/M6s/dho9CEWseh3pOBaVqCvXakiQLlZAXwKMmU04sqj4RvP?= =?us-ascii?q?TA6O4Hw0UGwQnwFUGQXI8FfxWZKn4XiyjfZ0xCTPZZ6+drszQzn3qv4zEBI=3D?= X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: =?us-ascii?q?A0BqAQD+rL9YfeXIaSZdGwEBAQMBAQEJA?= =?us-ascii?q?QEBFQEBAQECAQEBAQgBAQEBhAeBCgeDWYoMc5BYkGSEVIINKoRNgSsCgicHPxg?= =?us-ascii?q?BAQEBAQEBAQEBARIBAQsUCFeCMwQBHQEEgjwBBSMdAQE3AQ8LCw0CAiYCAiISA?= =?us-ascii?q?QUBHAYTiX8DC6NSP4sbaIImgwgBAQWHcgEBAQEBAQEBAgEBAQEBAQEBARcDBRJ?= =?us-ascii?q?5hUOEb4Q+gxyCX5w4hnaLQpEfSJEuFB6BFR+BOyIVCBcVPxcFhCmCD3WIRIFPA?= =?us-ascii?q?QEB?= X-IPAS-Result: =?us-ascii?q?A0BqAQD+rL9YfeXIaSZdGwEBAQMBAQEJAQEBFQEBAQECAQE?= =?us-ascii?q?BAQgBAQEBhAeBCgeDWYoMc5BYkGSEVIINKoRNgSsCgicHPxgBAQEBAQEBAQEBA?= =?us-ascii?q?RIBAQsUCFeCMwQBHQEEgjwBBSMdAQE3AQ8LCw0CAiYCAiISAQUBHAYTiX8DC6N?= =?us-ascii?q?SP4sbaIImgwgBAQWHcgEBAQEBAQEBAgEBAQEBAQEBARcDBRJ5hUOEb4Q+gxyCX?= =?us-ascii?q?5w4hnaLQpEfSJEuFB6BFR+BOyIVCBcVPxcFhCmCD3WIRIFPAQEB?= X-IronPort-AV: E=Sophos;i="5.36,262,1486422000"; d="scan'208";a="263621063" Received: from mxout3.mail.janestreet.com ([38.105.200.229]) by mail2-smtp-roc.national.inria.fr with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 08 Mar 2017 08:08:35 +0100 Received: from tot-qpr-mailcore1.delacy.com ([172.27.56.68] helo=tot-qpr-mailcore1) by mxout3.mail.janestreet.com with esmtps (TLSv1.2:DHE-RSA-AES256-GCM-SHA384:256) (Exim 4.84_2) (envelope-from ) id 1clVi5-0005pG-KY for caml-list@inria.fr; Wed, 08 Mar 2017 02:08:33 -0500 X-JS-Flow: external X-JS-Scanner-attachment: (ok) No attachments Received: by tot-qpr-mailcore1 with JS-mailcore (0.1) (envelope-from ) id BYv63x-AAADHw-SU; 2017-03-08 02:08:33.587618-05:00 Received: from mail-lf0-f70.google.com ([209.85.215.70]) by mxgoog1.mail.janestreet.com with esmtps (TLSv1.2:AES128-GCM-SHA256:128) (Exim 4.84_2) (envelope-from ) id 1clVi5-0001hX-EH for caml-list@inria.fr; Wed, 08 Mar 2017 02:08:33 -0500 Received: by mail-lf0-f70.google.com with SMTP id p78so14675106lfd.0 for ; Tue, 07 Mar 2017 23:08:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=janestreet.com; s=google; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=Xy3m197Fhq+uWKj+AhhatRjcj0XZPLGmel5q2+ZPFTw=; b=iFh82PYKzEiTDG37MdbHOBt5KN1dNuXVO0HwViYL2qLTmsVrR+o/7b0k3cdj1nrHt4 CcGBIQ0q4oKrugfTGx+ciVLgEXy100V0qoNWXx+xgOCxPUwu1K1U3TRcnuOaNeEBw0yr gnUJuXVn3SXElAkUCA8+0oxZLjy7H2tFGwD+4= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=Xy3m197Fhq+uWKj+AhhatRjcj0XZPLGmel5q2+ZPFTw=; b=Ol8jte+27iRcyBup2geNk9J+OMU9Xic8ziRrMkpN6POMQihizJln9/7ELWCww3ywxK +sWrvXcC7ISzpjsN7hQ3RG3eJXRhu+2fQYiwA153YMDwLMiJ96i6fC7pgl/qBbBSWPF9 Rp7KF4cV3ebz/6NMiUvdKPtzn3nZffwnP5RG4SC7xHurRT2AmpUWclwnkyoRw8jKtEIf a0rU+l1uTCea4DSI0JRUMb6bzYqjWgBN7ZMmwzrEmnVdFnhQ9LQRMYN82V8syrOMhQiR D1fCd6oIkRUZ0L4bLv9VJVmfdy3vhJBFvtoesKLSSxu3CVrM4foEFmD2vjciqCBLN5sJ k7zQ== X-Gm-Message-State: AMke39l4QInuJlcb8kk+MZcZNZ8UV+SgoSJ9unRZc2/12j7WJ7H6TfsfC1s5sErm16gWFZ3vS0wjQ1qVldbJCQe6vbd4oV+JT7eCUr8vRkTdW9f1VM1c5Yk+ID3tzPS/d8BtcznNUaTO6WkWHohg X-Received: by 10.25.99.153 with SMTP id v25mr1229452lfi.170.1488956912265; Tue, 07 Mar 2017 23:08:32 -0800 (PST) X-Received: by 10.25.99.153 with SMTP id v25mr1229449lfi.170.1488956912078; Tue, 07 Mar 2017 23:08:32 -0800 (PST) MIME-Version: 1.0 Received: by 10.25.163.204 with HTTP; Tue, 7 Mar 2017 23:08:31 -0800 (PST) In-Reply-To: References: From:Jeremie Dimino Date: Wed, 8 Mar 2017 07:08:31 +0000 Message-ID: To:Andre Nathan Cc:caml users Content-Type: text/plain; charset=UTF-8 X-JS-Processed-by: mailcore Subject: Re: [Caml-list] [ANN] libbin_prot, php-bin_prot, ppx_bin_prot_interop Hi Andre, This is really cool! Just a few days ago someone asked me if we could talk to a RPC server from C, so it looks like we could use libbin_prot right now. BTW, I've submitted a PR for the 1.0+beta1 of jbuilder yesterday, so it should reach opam soon. Jeremie On Tue, Mar 7, 2017 at 7:13 PM, Andre Nathan wrote: > Hi > > We have plans to make use of Jane Street's bin_prot-based RPC libraries > for some future projects, but one requirement is that we must > interoperate with clients written in other languages, namely PHP. > > So I've been working on these 3 projects to make this possible: > > * libbin_prot [1] is a C port of (most of) bin_prot, with added support > for RPC clients. This was written to avoid having to implement bin_prot > multiple times in other languages - one can just write bindings to the C > library. > > * php-bin_prot [2] is a PHP extension binding libbin_prot. It supports > both PHP 5 and 7. > > * ppx_bin_prot_interop [3] is a PPX rewriter that generates PHP code > from OCaml type definitions. It's written in a way that it should be > easy enough to add support for other languages, as it builds a > sort-of-AST that just has to be converted to strings in the proper > language syntax. It's a bit hackish but gets the job done. The > repository includes an example with an OCaml RPC server and a PHP client. > > ppx_bin_prot_interop is not on OPAM yet because I'm relying on the > latest jbuilder version that is only available on Jane Street's > repository [4] as of now. You should still be able to use it via "opam > pin" if you want to give it a try. > > [1] https://github.com/andrenth/libbin_prot > [2] https://github.com/andrenth/php-bin_prot > [3] https://github.com/andrenth/ppx_bin_prot_interop > [4] opam repo add janestreet > https://github.com/janestreet/opam-repository.git > > Now that OCaml can talk to PHP, world domination should not be too far. > > Cheers, > Andre > -- Jeremie