https://github.com/xigh/embed-rs-with-callbacks
https://github.com/xigh/embed-rs-with-callbacks
Last synced: 3 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/xigh/embed-rs-with-callbacks
- Owner: xigh
- License: mit
- Created: 2022-01-04T18:04:13.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2022-01-06T17:56:56.000Z (over 3 years ago)
- Last Synced: 2025-01-08T06:20:09.731Z (5 months ago)
- Language: Rust
- Size: 11.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Playing with C/C++ callbacks in Rust
### How to compile ?
#### Build embed-lib rust library:
```bash
cd embed-lib
cargo build
```#### Compile with VS2019 command prompt
```powershell
cl.exe /Zi src\main.cc embed-lib\target\debug\embed.lib
```#### Compile with clang on MacOS X (c++17: nullptr)
```bash
clang++ -g -std=c++17 src/main.cc embed-lib/target/debug/libembed.a -pthread -ldl
```#### Compile with gcc on Linux
```bash
g++ -g src/main.cc embed-lib/target/debug/libembed.a -pthread -ldl
```#### Compile with clang on Linux
```bash
clang++ -g src/main.cc embed-lib/target/debug/libembed.a -pthread -ldl
```