diff options
| author | sneurlax <sneurlax@gmail.com> | 2024-10-10 17:03:38 -0500 |
|---|---|---|
| committer | sneurlax <sneurlax@gmail.com> | 2024-10-10 17:03:43 -0500 |
| commit | eb7cc583ef7ce825520795fde2b514a304c5548c (patch) | |
| tree | 02848f6a13a6ca48a5fdea1889b105a704089fea /impls/monero_rust/README.md | |
| parent | 2a316156e914e744ed8aae501a5d5c4061df5f73 (diff) | |
support building other archs, copy file to correct path
and touch gitignore
Diffstat (limited to 'impls/monero_rust/README.md')
| -rw-r--r-- | impls/monero_rust/README.md | 30 |
1 files changed, 12 insertions, 18 deletions
diff --git a/impls/monero_rust/README.md b/impls/monero_rust/README.md index fa851fa..5affbd1 100644 --- a/impls/monero_rust/README.md +++ b/impls/monero_rust/README.md @@ -1,5 +1,5 @@ # `monero_rust` -`monero_c` bindings for Rust. +Proof of concept `monero_c` bindings for Rust. ## Getting started <!-- @@ -9,19 +9,17 @@ You may need sudo apt-get install libhidapi-dev ``` --> -1. Build `monero_c` -2. Copy the `monero_c` 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: +Build the monero_c Library for your architecture. Follow the upstream docs at +https://github.com/MrCyjaneK/monero_c <!-- TODO: use example CMakeLists --> and +place the library at `monero_c/impls/monero_rust/lib/libwallet2_api_c.so` or use +the provided script: ``` -./scripts/build_monero_c.sh +cd scripts +./build_monero_c.sh ``` -<!-- TODO add param for arch --> -or manually: +or build it manually as in: ``` git clone https://git.mrcyjanek.net/sneurlax/monero_c --branch rust cd monero_c @@ -30,16 +28,12 @@ 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) -``` -<!-- TODO add unxz etc --> -### Copy the `monero_c` library to `monero_rust`. -Copy your `libwallet` library to `monero_c/impls/monero_rust/lib`. -``` -cp build/release/monero/x86_64-linux-gnu_libwallet2_api_c.so ../lib -mv ../lib/x86_64-linux-gnu_libwallet2_api_c.so ../lib/libx86_64-linux-gnu_libwallet2_api_c.so +# Adjust the commands below for your arch. +unxz -f release/monero/x86_64-linux-gnu_libwallet2_api_c.so.xz +mv release/monero/x86_64-linux-gnu_libwallet2_api_c.so ../lib/libwallet2_api_c.so +# The library should be at monero_c/impls/monero_rust/lib/libwallet2_api_c.so. ``` -<!-- TODO automatically copy and rename using arch param IAW TODO above --> ### Run `monero_rust` example From `monero_c/impls/monero_rust`: |
