0.1.0 • Published 3 years ago

backend_manipulator v0.1.0

Weekly downloads
-
License
-
Repository
-
Last release
3 years ago

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 only
    • cargo run - build & run
    • cargo 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 Cargo build (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)
    • Generate your .header as described in option 1
  • 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.