Skip to main content
Best practices
2 votes
20 replies
355 views

I'm messing with FFI between Rust and C++ and I happen to know that some particular array of bytes pointed by a std::byte * pointer is a valid C++ object of type T, which can be anything for what ...
Nicola Gigante's user avatar
0 votes
0 answers
35 views

I found torch-text is archived, and I still want to use it ,because there is a course that uses it. but Since it was archived, I always meet signture missing problem, so I want to fork and fix it for ...
SteinGate's user avatar
Best practices
2 votes
16 replies
312 views

I have a C++ function void foo(quz::Bar &s); I want to expose this as a C function. Originally I was doing this for FFI, and calling foo from another language (compiles to scheme). So I wrapped ...
joel's user avatar
  • 8,201
Advice
0 votes
17 replies
98 views

I want to async not only call the cpp functions in Python but return Python functions in my cpp functions to make callbacks. Example python script import ffi import exemplecpp def hello(): print(...
NeverBackDown's user avatar
0 votes
1 answer
96 views

I am trying to cross-compile Dart with an FFI library using mingw. For the library I am using CMake (CMakeLists.txt): cmake_minimum_required(VERSION 3.10) project(HelloWorld C) # 1. Create the ...
Dimitrios Desyllas's user avatar
0 votes
1 answer
102 views

I have a list of Vector2 that I want to pass to this function: void DrawLineStrip(const Vector2 *points, int pointCount, Color color); There is a function _array/list which looks promising, as "...
user1785730's user avatar
  • 3,946
0 votes
0 answers
68 views

raylib.h has the following definition: #define RAYWHITE CLITERAL(Color){ 245, 245, 245, 255 } How can I import this definition so that I can use RAYWHITE?
user1785730's user avatar
  • 3,946
3 votes
1 answer
133 views

I cannot fix this error. build.sh is trying to create a shared library but it fails: ~/Desktop/deepseek$ ./build.sh Building Haskell shared library... Loaded package environment from /home/success/....
success moses's user avatar
Tooling
0 votes
1 replies
65 views

Is it possible to define the dynamic library location for an FFI at runtime? I have successfully generated an FFI for SFCGAL using toast in the nim programming context, but struggled a bit with the ...
huckfinn's user avatar
  • 695
Advice
1 vote
1 replies
140 views

I see that it is supposed to be possible to embed a Python interpreter in a Flutter app, so can I assume it should therefore also be possible to do this with a Ruby interpreter? (I would be happy ...
iconoclast's user avatar
4 votes
1 answer
196 views

I want to pass byte array to FFI in Rust. The allocation and deallocation should all be done in Rust. Here is my implementation. #[unsafe(no_mangle)] pub extern "C" fn get_data(ptr: *mut *...
lustfully's user avatar
3 votes
1 answer
255 views

To try out the Java 25 FFM API, I wanted to call C++ code through a C wrapper. To do that, I created a small C++ class and a C wrapper following an example from here. Printer.h #pragma once #include &...
Morgoth's user avatar
  • 53
0 votes
0 answers
43 views

I wanted to write a library in C to then link into Guile and in it i have to deal with strings. In the Guile manual the scm_to_locale_string() function has the following documentation: Returns a C ...
Eto on a mill's user avatar
0 votes
1 answer
63 views

I am writing bindings for the Z3 solver library for Idris, but have gotten stuck because I can't seem to find a way to pass a Vect AnyPtr to a Z3 function (in this case, Z3_mk_and with signature ...
Pandapip1's user avatar
  • 823
0 votes
1 answer
45 views

How to read printerStruct.pPrinterName using koffi? const koffi = require('koffi'); const winspool = koffi.load('winspool.drv'); const kernel32 = koffi.load('kernel32.dll'); const PRINTER_ENUM_LOCAL ...
Volodymyr Bezuglyy's user avatar

15 30 50 per page
1
2 3 4 5
126