Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/sn99/rust-ffi-examples
FFI examples written in Rust
https://github.com/sn99/rust-ffi-examples
c cmake cpp dart ffi ffi-bindings ffi-wrapper foreign-function-interface golang node python rust swift
Last synced: 3 months ago
JSON representation
FFI examples written in Rust
- Host: GitHub
- URL: https://github.com/sn99/rust-ffi-examples
- Owner: sn99
- Created: 2018-09-12T14:06:23.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2021-01-07T16:17:17.000Z (about 4 years ago)
- Last Synced: 2024-08-05T08:10:03.771Z (5 months ago)
- Topics: c, cmake, cpp, dart, ffi, ffi-bindings, ffi-wrapper, foreign-function-interface, golang, node, python, rust, swift
- Language: Makefile
- Homepage:
- Size: 362 KB
- Stars: 47
- Watchers: 4
- Forks: 9
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
FFI examples written in Rust
## A table for C/C++ type in Rust
|C type | Corresponding std::os::raw type |
|-----------------------|:--------------------------------|
|short | c_short |
|int | c_int |
|long | c_long |
|long long | c_longlong |
|unsigned short | c_ushort |
|unsigned, unsigned int | c_uint |
|unsigned long | c_ulong |
|unsigned long long | c_ulonglong |
|char | c_char |
|signed char | c_schar |
|unsigned char | c_uchar |
|float | c_float |
|double | c_double |
|void *, const void * | *mut c_void, *const c_void |
|usize | size_t |
|isize | ptrdiff_t |You can also use https://crates.io/crates/libc instead of std::os::raw