[Rcpp-devel] advice on sharing C++ code across R and Python

Kevin Thornton krthornt at uci.edu
Fri Apr 27 20:05:54 CEST 2018


Hi all,

pybind11 is the best choice here.  It goes quite a bit beyond what Boost
Python did, including nice support for Numpy arrays, the buffer protocol
more generally, and an Eigen interface.  I've used it quite a bit.

But the real issue will be separating out the guts of your code from the
Rcpp/pybind11-specific stuff, as others have mentioned.

--Kevin

On Fri, Apr 27, 2018 at 5:14 AM Dirk Eddelbuettel <edd at debian.org> wrote:

>
> Some folks told me that pybind11, ie at
>
>    https://github.com/pybind/pybind11
>
> is the one to use as Boost Python is stagnant. I have no personal
> experience
> with pybind11 though.
>
> The question is a good.  This (old) CRAN package has been doing both R and
> Python from a joint C++ basis for years:
>
>    https://cran.r-project.org/package=fastcluster
>
> but I also never looked in real detail at what it does.
>
> Dirk
>
> --
> http://dirk.eddelbuettel.com | @eddelbuettel | edd at debian.org
> _______________________________________________
> Rcpp-devel mailing list
> Rcpp-devel at lists.r-forge.r-project.org
> https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel
>
-- 

Kevin Thornton

Associate Professor

Ecology and Evolutionary Biology

UC Irvine

http://www.molpopgen.org

http://github.com/ThorntonLab

http://github.com/molpopgen
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.r-forge.r-project.org/pipermail/rcpp-devel/attachments/20180427/66c48761/attachment.html>


More information about the Rcpp-devel mailing list