GitXplorerGitXplorer
p

Rust_C_FFI_Test

public
0 stars
1 forks
0 issues

Commits

List of commits on branch main.
Unverified
52012eb953fcae0de80d36579c5bb210ab8f91f8

some changes it works well

ppauladam94 committed 6 months ago
Unverified
2fd753a01ec096b3a6c920fd43c978608928895b

everything works

ppauladam94 committed 7 months ago
Verified
79a29cd679e2d818353d3cdcd2ec0f51bd003396

Merge pull request #1 from marco-vassena/fix-link-error

ppauladam94 committed 7 months ago
Unverified
6addbd28fa085a010d9b8e48ad7ff1374079122f

Wrong name in c file

mmarco-vassena committed 7 months ago
Unverified
89a05b66e4f1891415d8af7c0b373b533aedb040

crate-type goes in separate lib section

mmarco-vassena committed 7 months ago
Unverified
8f447a5c9a127715ab12b5e6934e57734d11e8ad

not working c rust ffi

ppauladam94 committed 7 months ago

README

The README file for this repository.

Rust_C_FFI_Test

Some tests about Rust C FFI in the context of in internship about this subject.

How to compile the C file :

gcc main.c -o main -lrust_from_c -L./target/debug
#[no_mangle]
pub extern "C" fn hello_from_rust() {
    println!("Hello word from Rust");
}
extern void hello_from_rust();

int main(void) {
    hello_from_rust();
    return 0;
}