Hm, I’m not familiar with the dlopen crate, had you used it before? I can’t 
tell what’s going on under the hood!

I was able to get FFI working by looking at 
https://github.com/jsoftware/stats_jserver4r/blob/4c94fc6df351fab34791aa9d78d158eaefd33b17/source/lib/j2r.c
 
<https://github.com/jsoftware/stats_jserver4r/blob/4c94fc6df351fab34791aa9d78d158eaefd33b17/source/lib/j2r.c>
 and 
https://github.com/jsoftware/stats_jserver4r/blob/4c94fc6df351fab34791aa9d78d158eaefd33b17/source/lib/r2j.c
 
<https://github.com/jsoftware/stats_jserver4r/blob/4c94fc6df351fab34791aa9d78d158eaefd33b17/source/lib/r2j.c>

I got Haskell bindings: https://github.com/vmchale/j-hs 
<https://github.com/vmchale/j-hs> but BUT interestingly one test fails on older 
GHCs… can’t tell why and I never did get around to debugging it.

BTW I get

error: test failed, to rerun pass '--lib'

Caused by:
  process didn't exit successfully: 
`/private/tmp/jlang-rs/target/debug/deps/jlang-1c90c81a3f6fae1c --nocapture` 
(signal: 11, SIGSEGV: invalid memory reference)

on mac

> On Dec 6, 2021, at 7:22 PM, bill lam <bbill....@gmail.com> wrote:
> 
> I don't know rust at all. What exactly do you expect and how it failed?
> 
> On Tue, 7 Dec 2021 at 9:10 AM Michal Wallace <michal.wall...@gmail.com>
> wrote:
> 
>> ... It was not a successfu attempt. :)
>> 
>> https://github.com/tangentstorm/jlang-rs/blob/main/src/lib.rs
>> 
>> The basic plumbing seems to work unless I actually call JDo() on line 75
>> here.
>> Any rust fans out there who might be able to help me figure this out?
>> 
>> -Michal
>> ----------------------------------------------------------------------
>> For information about J forums see http://www.jsoftware.com/forums.htm
>> 
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm

----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to