0.1.0 • Published 4 years ago
backend_manipulator v0.1.0
Rust Backend Manipulation Engine
Install
Install Rust, Cargo and cbindgen
Run
- Option 1: Terminal
- cd to the repo
cargo install(first time only)cargo build- build onlycargo run- build & runcargo test- run utests- Important! after you've built your code as the above, you need to generate a corresponding .header file. run
cbindgen --config cbindgen.toml src/lib.rs --crate target/release/libbackend_manipulator.a --output rust_artifacts/backend_manipulator.h
Option 2: IDE CLion +Rust plugin (requires a license to Clion form Helpdesk)
- configure a new
Cargobuild (if it is greyed out, just wait for the init to finish - it happens after installing CLion +Rust for the first ime) - on the command line add:
- Run:
run <path/to/your/test/file> - Build:
build - Build with release binary:
build --release(exec will be under target/release/rust) - Utest: "test" (a.k.a
Cargo test)
- Run:
- Generate your .header as described in option 1
- configure a new
- Option 3: auto.sh script (mac/linux)
- chmod +x ./auto.sh
- ./auto.sh
Test Go code with your Rust artifacts
- After you built the code and generated your .header file, make sure both rust/target/release/libbackend_manipulator.a and backend_manipulator.h are copied to http_proxy/rust/rust_artifacts/ dir.
- Now your can run your go project via Golang as always.
0.1.0
4 years ago