-
Notifications
You must be signed in to change notification settings - Fork 295
Closed
Labels
C-enhancementNeeds additonal contents.Needs additonal contents.

Description
This https://doc.rust-lang.org/nomicon/ffi.html#calling-rust-code-from-c
( and even in the book here: https://doc.rust-lang.org/stable/book/ch19-01-unsafe-rust.html#calling-rust-functions-from-other-languages )
has no mention of all the other info needed to accomplish this, such as: compile as a cdylib by adding crate-type = [ "cdylib" ]
in Cargo.toml
[lib]
section, or using cbindgen
to generate a header file, or the gcc
command line to compile the .cpp
file.
(NOTE: the below link is now invalid as the author deleted their account.)
I've attempted all the needed stuff in a working example here.
Metadata
Metadata
Assignees
Labels
C-enhancementNeeds additonal contents.Needs additonal contents.