Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/iujakchu/cxx-xmake-example
modern cpp with the power of rust
https://github.com/iujakchu/cxx-xmake-example
cpp cxx ffi lto mold rust xmake
Last synced: 3 months ago
JSON representation
modern cpp with the power of rust
- Host: GitHub
- URL: https://github.com/iujakchu/cxx-xmake-example
- Owner: iujakchu
- Created: 2022-06-01T05:20:55.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2022-06-09T07:26:53.000Z (over 2 years ago)
- Last Synced: 2024-07-30T21:05:44.254Z (6 months ago)
- Topics: cpp, cxx, ffi, lto, mold, rust, xmake
- Language: Rust
- Homepage:
- Size: 25.4 KB
- Stars: 1
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
# modern cpp with rust
## Try to find a way to call rust from within cpp side.
There are some tools I have used.
* linker: [mold](https://github.com/rui314/mold)
* build system: [xmake](https://github.com/xmake-io/xmake)
* compile toolchain: clang-13
* rustc: 1.59.0(you have to use specific version for [compatibility](https://doc.rust-lang.org/rustc/linker-plugin-lto.html#toolchain-compatibility) with clang)
* interoperation: [cxx](https://cxx.rs/)# Run
```shell
xmake
xmake run
```
# TODO
- [x] LTO/IPO support
- [x] CI/CD
- [x] Dockerfile
# Credits
* This project is almost a fork of [cxx-cmake-example](https://github.com/XiangpengHao/cxx-cmake-example) .
* explain the steps of [lto](https://blog.llvm.org/2019/09/closing-gap-cross-language-lto-between.html)
* [rustc lto plugin](https://doc.rust-lang.org/rustc/linker-plugin-lto.html)