From d780ed915352dcb2b3b9718cea50a47965cb587f Mon Sep 17 00:00:00 2001 From: sneurlax Date: Wed, 9 Oct 2024 19:07:46 -0500 Subject: add example monero_c static lib build script courtesy of cypherstack/flutter_libmonero and MrCyjaneK & julian-CStack's work there remove wownero update docs and script add gitignore --- impls/monero_rust/README.md | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 impls/monero_rust/README.md (limited to 'impls/monero_rust/README.md') diff --git a/impls/monero_rust/README.md b/impls/monero_rust/README.md new file mode 100644 index 0000000..eeb3524 --- /dev/null +++ b/impls/monero_rust/README.md @@ -0,0 +1,40 @@ +# `monero_rust` +`monero_c` bindings for Rust. + +## Getting started +1. Build `monero_c` +2. Copy the `monero_c` static library to `monero_rust`. +3. Run `monero_rust` example + +### Build `monero_c` +Build a monero_c static Library for your architecture. Follow the upstream docs +at https://github.com/MrCyjaneK/monero_c or for example: +``` +./scripts/build_monero_c.sh +``` + + +or manually: +``` +git clone https://git.mrcyjanek.net/sneurlax/monero_c --branch rust +cd monero_c +git submodule update --init --recursive +rm -rf monero wownero release # Clean any previous builds. +git submodule update --init --recursive --force +./apply_patches.sh monero +./build_single.sh monero x86_64-linux-gnu -j$(nproc) +``` + + +### Copy the `monero_c` static library to `monero_rust`. +Copy your `libwallet` static library to `monero_c/impls/monero_rust/lib`. +``` +cp build/release/monero/x86_64-linux-gnu_libwallet2_api_c.so ../lib +``` + + +### Run `monero_rust` example +From `monero_c/impls/monero_rust`: +``` +cargo run +``` -- cgit v1.2.3