# \#interoperability

**URL:** https://discourse.julialang.org/tag/interoperability/87.md?match_all_tags=true&page=1&tags%5B%5D=interoperability

[Latest](https://discourse.julialang.org/latest.md) · [Categories](https://discourse.julialang.org/categories.md) · [Tags](https://discourse.julialang.org/tags.md)

**Page:** 2

---

## [\[ANN\] PythonCall and JuliaCall](https://discourse.julialang.org/t/ann-pythoncall-and-juliacall/76778)

<div class="topic-metadata">

**Author:** [@cjdoris](https://discourse.julialang.org/u/cjdoris)\
**Replies:** 84\
**Last updated:** [May 8, 2023, 11:35pm UTC](https://discourse.julialang.org/t/ann-pythoncall-and-juliacall/76778 "2023-05-08T23:35:55Z")

</div>

PythonCall & JuliaCall I’m very pleased to finally announce these packages on here. They have existed for quite some time, but I’m now happy to encourage more users to try them out. PythonCall is a Julia package to inte…

---

## [Interoperability with .NET](https://discourse.julialang.org/t/interoperability-with-net/19611)

<div class="topic-metadata">

**Author:** [@rudreshahk](https://discourse.julialang.org/u/rudreshahk)\
**Replies:** 41\
**Last updated:** [October 9, 2022, 9:40pm UTC](https://discourse.julialang.org/t/interoperability-with-net/19611 "2022-10-09T21:40:23Z")

</div>

We have some Dimension Selector built in .NET which i want to invoke from Julia. IS there any Julia to .NET interoperability tools? I have used R.NET for R to .NET connection and Pythonnet for Python to .NET connection.…

---

## [C routine uses AVX intrinsics](https://discourse.julialang.org/t/c-routine-uses-avx-intrinsics/87777)

<div class="topic-metadata">

**Author:** [@JeffreySarnoff](https://discourse.julialang.org/u/JeffreySarnoff)\
**Replies:** 15\
**Last updated:** [September 26, 2022, 9:19pm UTC](https://discourse.julialang.org/t/c-routine-uses-avx-intrinsics/87777 "2022-09-26T21:19:33Z")

</div>

I would like to make the example in the docs work. The presentation is incomplete; while I have the requisite tools, it is unclear how best (most simply and effectively) apply them here: the easiest most foolproof way to…

---

## [How do I obtain \`sizeof(struct sigaction)\`? Clang.jl?](https://discourse.julialang.org/t/how-do-i-obtain-sizeof-struct-sigaction-clang-jl/84344)

<div class="topic-metadata">

**Author:** [@mkitti](https://discourse.julialang.org/u/mkitti)\
**Replies:** 4\
**Last updated:** [July 18, 2022, 8:33am UTC](https://discourse.julialang.org/t/how-do-i-obtain-sizeof-struct-sigaction-clang-jl/84344 "2022-07-18T08:33:42Z")

</div>

I would like to figure out the value printed by this C program in Julia. #include \<signal.h\> #include \<stdio.h\> int main() { printf("%ld", sizeof(struct sigaction)); return 0; } On my system, this print…

---

## [Accessing fields of structs passed from C to Julia](https://discourse.julialang.org/t/accessing-fields-of-structs-passed-from-c-to-julia/77712)

<div class="topic-metadata">

**Author:** [@acarta](https://discourse.julialang.org/u/acarta)\
**Replies:** 9\
**Last updated:** [March 11, 2022, 6:05pm UTC](https://discourse.julialang.org/t/accessing-fields-of-structs-passed-from-c-to-julia/77712 "2022-03-11T18:05:06Z")

</div>

I’m using PackageCompiler to create a C-compatible library. The library’s main purpose is to analyze data that’s collected and passed from an existing C codebase. The communication between my library and the existing co…

---

## [\[ANN\] DLPack.jl - Share CPU and CUDA arrays between Julia and Python](https://discourse.julialang.org/t/ann-dlpack-jl-share-cpu-and-cuda-arrays-between-julia-and-python/76871)

<div class="topic-metadata">

**Author:** [@PabloZubieta](https://discourse.julialang.org/u/PabloZubieta)\
**Replies:** 0\
**Last updated:** [February 21, 2022, 11:01pm UTC](https://discourse.julialang.org/t/ann-dlpack-jl-share-cpu-and-cuda-arrays-between-julia-and-python/76871 "2022-02-21T23:01:29Z")

</div>

Hello, I’m pleased to announce the release of DLPack.jl. DLPack is a C API that has continuously been adopted as a the base protocol for exchanging tensor data structures between different python libraries including JAX,…

---

## [Has Anyone Used RCall with \`renv\`?](https://discourse.julialang.org/t/has-anyone-used-rcall-with-renv/76310)

<div class="topic-metadata">

**Author:** [@TheCedarPrince](https://discourse.julialang.org/u/TheCedarPrince)\
**Replies:** 2\
**Last updated:** [February 14, 2022, 4:45pm UTC](https://discourse.julialang.org/t/has-anyone-used-rcall-with-renv/76310 "2022-02-14T16:45:20Z")

</div>

Hi all! Just was wondering if anyone has had any luck with using renv with RCall. In R, I use renv to manage my package versions per project (very similar to lock files in Julia) and usually you can activate renv easil…

---

## [Has Anyone Interfaced Julia with Haskell?](https://discourse.julialang.org/t/has-anyone-interfaced-julia-with-haskell/72751)

<div class="topic-metadata">

**Author:** [@TheCedarPrince](https://discourse.julialang.org/u/TheCedarPrince)\
**Replies:** 0\
**Last updated:** [December 8, 2021, 8:03am UTC](https://discourse.julialang.org/t/has-anyone-interfaced-julia-with-haskell/72751 "2021-12-08T08:03:10Z")

</div>

Hi all, Out of curiosity, has anyone interfaced Julia with a Haskell instance? I am curious about bridging the two languages and was curious if anyone had attempted this before. Thanks! ~ tcp :deciduous\_tree:

---

## [How to free resources used within the JuliaCall environment?](https://discourse.julialang.org/t/how-to-free-resources-used-within-the-juliacall-environment/66565)

<div class="topic-metadata">

**Author:** [@mkarikom](https://discourse.julialang.org/u/mkarikom)\
**Replies:** 0\
**Last updated:** [August 17, 2021, 7:09pm UTC](https://discourse.julialang.org/t/how-to-free-resources-used-within-the-juliacall-environment/66565 "2021-08-17T19:09:16Z")

</div>

What is the best way to do this? Is there a variable within the R session that I can rm() to free memory from the julia variables that were created?

---

## [\[ANN\] JuliaFromMATLAB.jl - Call Julia from MATLAB](https://discourse.julialang.org/t/ann-juliafrommatlab-jl-call-julia-from-matlab/66882)

<div class="topic-metadata">

**Author:** [@jondeuce](https://discourse.julialang.org/u/jondeuce)\
**Replies:** 7\
**Last updated:** [August 25, 2021, 11:50am UTC](https://discourse.julialang.org/t/ann-juliafrommatlab-jl-call-julia-from-matlab/66882 "2021-08-25T11:50:24Z")

</div>

Inspired by this recent discussion regarding the state of calling Julia from MATLAB, I have put together a package to try to resolve some of the issues faced by previous approaches: JuliaFromMATLAB.jl. Please scroll down…

---

## [Accessing variables in Main within a Module using RCall](https://discourse.julialang.org/t/accessing-variables-in-main-within-a-module-using-rcall/63813)

<div class="topic-metadata">

**Author:** [@viraltux](https://discourse.julialang.org/u/viraltux)\
**Replies:** 4\
**Last updated:** [July 1, 2021, 5:30pm UTC](https://discourse.julialang.org/t/accessing-variables-in-main-within-a-module-using-rcall/63813 "2021-07-01T17:30:40Z")

</div>

I would like to access variables declared in Main from within a module but they’re not in scope and I wonder how this can be achieved. using RCall x = 1 f(var::String) = eval(Meta.parse("@rput ("\*var\*")")) module M1 …

---

## [Transferring a matrix from Mathematica to Julia](https://discourse.julialang.org/t/transferring-a-matrix-from-mathematica-to-julia/61910)

<div class="topic-metadata">

**Author:** [@Thomas](https://discourse.julialang.org/u/Thomas)\
**Replies:** 3\
**Last updated:** [June 2, 2021, 11:51am UTC](https://discourse.julialang.org/t/transferring-a-matrix-from-mathematica-to-julia/61910 "2021-06-02T11:51:39Z")

</div>

What is the recommended ways to transfer a matrix generated in Mathematica to Julia and benefits/disadvantages? My workflow is the following: generate matrices in Mathematica transfer the matrices to Julia (via some st…

---

## [Register a new PyCall version?](https://discourse.julialang.org/t/register-a-new-pycall-version/58947)

<div class="topic-metadata">

**Author:** [@sethaxen](https://discourse.julialang.org/u/sethaxen)\
**Replies:** 3\
**Last updated:** [April 9, 2021, 10:45pm UTC](https://discourse.julialang.org/t/register-a-new-pycall-version/58947 "2021-04-09T22:45:34Z")

</div>

A fix for a Python/Julia interop issue was pushed to PyCall.jl 3 months ago. Can someone please register a new version? I have been unable to reach the maintainers through GitHub and Slack.

---

## [Wrapping a simple R package](https://discourse.julialang.org/t/wrapping-a-simple-r-package/55349)

<div class="topic-metadata">

**Author:** [@Albert\_Zevelev](https://discourse.julialang.org/u/Albert_Zevelev)\
**Replies:** 2\
**Last updated:** [February 16, 2021, 4:47am UTC](https://discourse.julialang.org/t/wrapping-a-simple-r-package/55349 "2021-02-16T04:47:37Z")

</div>

I want to wrap a simple ML package: sprintr. In R the code is straight-forward: library(sprintr); m = cv.sprinter(x = X, y = y) pred = predict(m, newdata = XH) In Julia it works in 1-step: X = randn(100,5) y = 7.0 .…

---

## [Dynamic Imports and User Defined Interfaces in Julia](https://discourse.julialang.org/t/dynamic-imports-and-user-defined-interfaces-in-julia/48274)

<div class="topic-metadata">

**Author:** [@gyrfalcon](https://discourse.julialang.org/u/gyrfalcon)\
**Replies:** 4\
**Last updated:** [October 14, 2020, 2:16am UTC](https://discourse.julialang.org/t/dynamic-imports-and-user-defined-interfaces-in-julia/48274 "2020-10-14T02:16:38Z")

</div>

Hello! I am a newcomer to Julia and I am trying to recreate something that I worked a bit on in Python in Julia, because I think Julia will be the better language overall for numerical performance. However, I am trying t…

---

## [Building -- and releasing -- a fully self-contained Application written in julia](https://discourse.julialang.org/t/building-and-releasing-a-fully-self-contained-application-written-in-julia/10418)

<div class="topic-metadata">

**Author:** [@NHDaly](https://discourse.julialang.org/u/NHDaly)\
**Replies:** 16\
**Last updated:** [October 5, 2020, 2:13pm UTC](https://discourse.julialang.org/t/building-and-releasing-a-fully-self-contained-application-written-in-julia/10418 "2020-10-05T14:13:20Z")

</div>

\-– This post is a follow-up to my previous post on compiling a binary for distribution: How to compile a portable binary (at least across macs) with \`juliac.jl\`. — More cool news!! You can write software in Julia, and t…

---

## [\[ANN\] Announcing CGAL.jl](https://discourse.julialang.org/t/ann-announcing-cgal-jl/43260)

<div class="topic-metadata">

**Author:** [@rgcv](https://discourse.julialang.org/u/rgcv)\
**Replies:** 8\
**Last updated:** [July 24, 2020, 5:46pm UTC](https://discourse.julialang.org/t/ann-announcing-cgal-jl/43260 "2020-07-24T17:46:54Z")

</div>

Good evening, I’m pleased to announce that I’ve just registered CGAL.jl, a package that aptly maps a series of types and functionality from CGAL (Computational Geometry Algorithms Library), a C++ library, to Julia. I’v…

---

## [Unsigned long in ccall](https://discourse.julialang.org/t/unsigned-long-in-ccall/38557)

<div class="topic-metadata">

**Author:** [@mzaffalon](https://discourse.julialang.org/u/mzaffalon)\
**Replies:** 6\
**Last updated:** [May 1, 2020, 2:46pm UTC](https://discourse.julialang.org/t/unsigned-long-in-ccall/38557 "2020-05-01T14:46:16Z")

</div>

I need to call a MPFR library function whose signature is int mpfr\_sub\_ui(mpfr\_t rop, mpfr\_t op1, unsigned long int op2, mpfr\_rnd\_t rnd). The manual says that unsigned long is an Int on Unix and an Int32 on Windows. Is …

---

## [Calling C++ function that takes and returns Eigen Matrix from Julia](https://discourse.julialang.org/t/calling-c-function-that-takes-and-returns-eigen-matrix-from-julia/28287)

<div class="topic-metadata">

**Author:** [@amit112amit](https://discourse.julialang.org/u/amit112amit)\
**Replies:** 4\
**Last updated:** [September 4, 2019, 4:48am UTC](https://discourse.julialang.org/t/calling-c-function-that-takes-and-returns-eigen-matrix-from-julia/28287 "2019-09-04T04:48:57Z")

</div>

What is the best approach to call a C++ function which accepts and returns an Eigen Matrix? The function has signature Eigen::Matrix3Xi makeconvexhull(Eigen::Matrix3Xd points) Here, points is a 3 x N matrix of double a…

---

## [Error Building RCall](https://discourse.julialang.org/t/error-building-rcall/27924)

<div class="topic-metadata">

**Author:** [@Yifan\_Liu](https://discourse.julialang.org/u/Yifan_Liu)\
**Replies:** 0\
**Last updated:** [August 24, 2019, 5:34am UTC](https://discourse.julialang.org/t/error-building-rcall/27924 "2019-08-24T05:34:33Z")

</div>

I noticed that I could not use the RCall package properly. When I run Pkg.build(“RCall”), I got the error message: ERROR: LoadError: R cannot be found. Set the “R\_HOME” environment variable to re-run Pkg.build(“RCall”)…

---

## [Interpret \`NTuple{1024, UInt8}\` as a C string](https://discourse.julialang.org/t/interpret-ntuple-1024-uint8-as-a-c-string/23906)

<div class="topic-metadata">

**Author:** [@goretkin](https://discourse.julialang.org/u/goretkin)\
**Replies:** 5\
**Last updated:** [May 8, 2019, 10:51am UTC](https://discourse.julialang.org/t/interpret-ntuple-1024-uint8-as-a-c-string/23906 "2019-05-08T10:51:12Z")

</div>

I am calling some C code. One of the structs has a field is of type char \[1024\], which Clang.jl turns into NTuple{1024,UInt8}. This is a null-terminated C string. How can I get a String-like thing from this without copy…

---

## [Linker error with CxxWrap on Windows10](https://discourse.julialang.org/t/linker-error-with-cxxwrap-on-windows10/19967)

<div class="topic-metadata">

**Author:** [@cserteGT3](https://discourse.julialang.org/u/cserteGT3)\
**Replies:** 1\
**Last updated:** [January 23, 2019, 9:16pm UTC](https://discourse.julialang.org/t/linker-error-with-cxxwrap-on-windows10/19967 "2019-01-23T21:16:18Z")

</div>

I’m trying to reproduce the Hello world example of the CxxWrap package. Using Windows10, Visual Studio 2017, and Julia v1.0.2. At the Linker settings, I should add the "C:\\JuliaPro\\pkgs-0.5.1.1\\v0.5\\CxxWrap\\deps\\usr\\li…

---

## [Wrapping typedef enum with Clang.jl](https://discourse.julialang.org/t/wrapping-typedef-enum-with-clang-jl/17425)

<div class="topic-metadata">

**Author:** [@samuelpowell](https://discourse.julialang.org/u/samuelpowell)\
**Replies:** 11\
**Last updated:** [November 13, 2018, 8:17am UTC](https://discourse.julialang.org/t/wrapping-typedef-enum-with-clang-jl/17425 "2018-11-13T08:17:52Z")

</div>

If I try to wrap the following header: typedef enum \_foo { BAR, BAZ } foo; using the following Clang.jl script: using Clang.wrap\_c const context = wrap\_c.init( headers = \[joinpath(@\_\_DIR\_\_, "header.h")\], …

---

## [Modifying Julia struct from C](https://discourse.julialang.org/t/modifying-julia-struct-from-c/10847)

<div class="topic-metadata">

**Author:** [@dm3](https://discourse.julialang.org/u/dm3)\
**Replies:** 2\
**Last updated:** [May 11, 2018, 10:08pm UTC](https://discourse.julialang.org/t/modifying-julia-struct-from-c/10847 "2018-05-11T22:08:47Z")

</div>

I want to drive a Julia program from Java. There’s a lot of communication going Java-\>Julia on a known and very limited number of elements. I’ve come up with a zero-copy approach that I think could work, but need some gu…

---

## [How to compile a portable binary (at least across macs) with \`juliac.jl\`](https://discourse.julialang.org/t/how-to-compile-a-portable-binary-at-least-across-macs-with-juliac-jl/9438)

<div class="topic-metadata">

**Author:** [@NHDaly](https://discourse.julialang.org/u/NHDaly)\
**Replies:** 12\
**Last updated:** [March 23, 2018, 5:04pm UTC](https://discourse.julialang.org/t/how-to-compile-a-portable-binary-at-least-across-macs-with-juliac-jl/9438 "2018-03-23T17:04:46Z")

</div>

Cool news! Thanks to @simonbyrne, I’ve managed to compile a julia program on one mac, ship it to another mac that’s never even heard of julia, and certainly doesn’t have it installed, and it runs!! (And it’s a 10 year ol…

---

## [Strange issue when using ccall](https://discourse.julialang.org/t/strange-issue-when-using-ccall/5600)

<div class="topic-metadata">

**Author:** [@noobIntern](https://discourse.julialang.org/u/noobIntern)\
**Replies:** 0\
**Last updated:** [August 27, 2017, 7:33pm UTC](https://discourse.julialang.org/t/strange-issue-when-using-ccall/5600 "2017-08-27T19:33:24Z")

</div>

Hello everyone. I am writing a small Julia module that call external C libraries from a third-party software package/API. The module appears to be working correctly. However when I include other modules ( I have test…

---

## [Issue when loading modules using ccall](https://discourse.julialang.org/t/issue-when-loading-modules-using-ccall/5599)

<div class="topic-metadata">

**Author:** [@noobIntern](https://discourse.julialang.org/u/noobIntern)\
**Replies:** 0\
**Last updated:** [August 27, 2017, 7:33pm UTC](https://discourse.julialang.org/t/issue-when-loading-modules-using-ccall/5599 "2017-08-27T19:33:21Z")

</div>

Hello everyone. I am writing a small Julia module that call external C libraries from a third-party software package/API. The module appears to be working correctly. However when I include other modules ( I have test…

---

## [Alternatives to ZMQ for 32bit to 64bit library interface](https://discourse.julialang.org/t/alternatives-to-zmq-for-32bit-to-64bit-library-interface/4552)

<div class="topic-metadata">

**Author:** [@jtravs](https://discourse.julialang.org/u/jtravs)\
**Replies:** 2\
**Last updated:** [June 30, 2017, 4:56am UTC](https://discourse.julialang.org/t/alternatives-to-zmq-for-32bit-to-64bit-library-interface/4552 "2017-06-30T04:56:59Z")

</div>

I need to call a 32bit library from Julia. However, I need to run Julia as a 64bit process (to call several other libraries). I cannot (AFAIK) ccall a 32bit binary from 64bit Julia. One solution I have is to write a C++…

---

## [CxxWrap namespace rename](https://discourse.julialang.org/t/cxxwrap-namespace-rename/3754)

<div class="topic-metadata">

**Author:** [@barche](https://discourse.julialang.org/u/barche)\
**Replies:** 1\
**Last updated:** [May 16, 2017, 11:01pm UTC](https://discourse.julialang.org/t/cxxwrap-namespace-rename/3754 "2017-05-16T23:01:27Z")

</div>

Hi all, Following @SylvainCorlay 's work, we are thinking of splitting off the C++ part of CxxWrap into a separate C++ project. This would simplify things for e.g. Linux distributions, where the binaries could be distri…

---

## [Interface to c++ code](https://discourse.julialang.org/t/interface-to-c-code/1865)

<div class="topic-metadata">

**Author:** [@ndbecker](https://discourse.julialang.org/u/ndbecker)\
**Replies:** 6\
**Last updated:** [February 3, 2017, 6:05pm UTC](https://discourse.julialang.org/t/interface-to-c-code/1865 "2017-02-03T18:05:04Z")

</div>

I know that perhaps in the future I could use cxx, but for now that doesn’t seem an option because it requires a non-standard build of julia. So I’m playing with ccall interface. I want to use code that represents mult…

[Previous page](https://discourse.julialang.org/tag/interoperability/87.md?match_all_tags=true&tags%5B%5D=interoperability)

[Next page](https://discourse.julialang.org/tag/interoperability/87.md?match_all_tags=true&page=2&tags%5B%5D=interoperability)
