Code Monkey home page Code Monkey logo

geosteiner-rs-template's Introduction

geosteiner-rs-template

A template for working with the geosteiner C library in Rust

!Disclaimer!
This project is not made professionally. Use with caution.
Functionalities of the original geosteiner library might not work as expected.

Installation

This project does not run on ARM systems like the raspberry pi.

   1. Download this project or click "use this template" to create a repository using this project as a template.
   2. Make changes according to your own project. (optional if testing this template)

With Docker:
   3. Modify the Dockerfile to fit your project. (Should work out of the box for the template)
   4. Run the Docketfile.

Without Docker:
   3. Use cargo build --features rebuild_c to build the project and the needed C library.
   4. Run the project with cargo run.

Debugging:
To debug the building process delete the target directory with cargo clean
and use cargo build -vv --features rebuild_c to rebuild everything.

geosteiner-rs-template's People

Contributors

agent59 avatar

Stargazers

 avatar

Watchers

 avatar

geosteiner-rs-template's Issues

I Need your help

I don't understand rust very well.
When I tried to runnig I encountered the following problems. I don't understand what went wrong? Need your help

XXX@XXX:/home/XXX/test/geosteiner-rs-template# cargo build
warning: fields `p1` and `p2` are never read
  --> src/geosteiner.rs:18:5
   |
17 | pub struct Edge {
   |            ---- fields in this struct
18 |     p1: i32, // number of point 1
   |     ^^
19 |     p2: i32, // number of point 2
   |     ^^
   |
   = note: `Edge` has derived impls for the traits `Debug` and `Clone`, but these are intentionally ignored during dead code analysis
   = note: `#[warn(dead_code)]` on by default

warning: `geosteiner-rs-template` (lib) generated 1 warning
   Compiling geosteiner-rs-template v0.1.0 (/home/pan/test/geosteiner-rs-template)
error: linking with `cc` failed: exit status: 1
  |
  = note: LC_ALL="C" PATH="/root/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/bin:/root/.cargo/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin" VSLANG="1033" "cc" "-m64" "/tmp/rustcgBi8SB/symbols.o" "/home/pan/test/geosteiner-rs-template/target/debug/deps/geosteiner_rs_template-978b7efc25bd4064.1g3ba6kf09fska78.rcgu.o" "/home/pan/test/geosteiner-rs-template/target/debug/deps/geosteiner_rs_template-978b7efc25bd4064.2ilpc5wwpqehbpy7.rcgu.o" "/home/pan/test/geosteiner-rs-template/target/debug/deps/geosteiner_rs_template-978b7efc25bd4064.3bl4iwj58idpbll1.rcgu.o" "/home/pan/test/geosteiner-rs-template/target/debug/deps/geosteiner_rs_template-978b7efc25bd4064.3qz1nnqnwod0bol.rcgu.o" "/home/pan/test/geosteiner-rs-template/target/debug/deps/geosteiner_rs_template-978b7efc25bd4064.3wx1zrzgnon9xhvt.rcgu.o" "/home/pan/test/geosteiner-rs-template/target/debug/deps/geosteiner_rs_template-978b7efc25bd4064.41pleo7a66zhtsnt.rcgu.o" "/home/pan/test/geosteiner-rs-template/target/debug/deps/geosteiner_rs_template-978b7efc25bd4064.473wzdkye83em5kh.rcgu.o" "/home/pan/test/geosteiner-rs-template/target/debug/deps/geosteiner_rs_template-978b7efc25bd4064.48689ywvp8bywmmc.rcgu.o" "/home/pan/test/geosteiner-rs-template/target/debug/deps/geosteiner_rs_template-978b7efc25bd4064.4aqbbhamosycmzhm.rcgu.o" "/home/pan/test/geosteiner-rs-template/target/debug/deps/geosteiner_rs_template-978b7efc25bd4064.4s3zjxrpbzw3ol2c.rcgu.o" "/home/pan/test/geosteiner-rs-template/target/debug/deps/geosteiner_rs_template-978b7efc25bd4064.5gbvjkazt5zp6n5g.rcgu.o" "/home/pan/test/geosteiner-rs-template/target/debug/deps/geosteiner_rs_template-978b7efc25bd4064.2jgc1fu9p30hw2to.rcgu.o" "-Wl,--as-needed" "-L" "/home/pan/test/geosteiner-rs-template/target/debug/deps" "-L" "src/geosteiner" "-L" "/root/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib" "-Wl,-Bstatic" "/home/pan/test/geosteiner-rs-template/target/debug/deps/libgeosteiner_rs_template-ab7d8c8882fd771d.rlib" "/root/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libstd-8f88c761e33f2651.rlib" "/root/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libpanic_unwind-f9018f9cee1cc5ff.rlib" "/root/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libobject-919f89587cbed68d.rlib" "/root/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libmemchr-c6624cb4360306cd.rlib" "/root/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libaddr2line-4930b3dc482158f7.rlib" "/root/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libgimli-65bea4bb6af40828.rlib" "/root/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/librustc_demangle-bc6864da821ce9a2.rlib" "/root/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libstd_detect-1bccb7a942e1b311.rlib" "/root/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libhashbrown-356231f77d1e268a.rlib" "/root/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/librustc_std_workspace_alloc-80ed5799bf463787.rlib" "/root/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libminiz_oxide-9c3df673b2797081.rlib" "/root/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libadler-c6afbee8d1102512.rlib" "/root/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libunwind-682387162b570769.rlib" "/root/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcfg_if-05a2cedbb78c1d4f.rlib" "/root/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/liblibc-f002c8f83a289c4b.rlib" "/root/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/liballoc-649be05783c8912e.rlib" "/root/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/librustc_std_workspace_core-13da980d6c74fec5.rlib" "/root/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcore-46a989d0e2cef827.rlib" "/root/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcompiler_builtins-b114db70ea0690b1.rlib" "-Wl,-Bdynamic" "-lrs_geosteiner" "-lgcc_s" "-lutil" "-lrt" "-lpthread" "-lm" "-ldl" "-lc" "-Wl,--eh-frame-hdr" "-Wl,-z,noexecstack" "-L" "/root/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib" "-o" "/home/pan/test/geosteiner-rs-template/target/debug/deps/geosteiner_rs_template-978b7efc25bd4064" "-Wl,--gc-sections" "-pie" "-Wl,-z,relro,-z,now" "-nodefaultlibs"
  = note: /usr/bin/ld: cannot find -lrs_geosteiner
          collect2: error: ld returned 1 exit status


error: could not compile `geosteiner-rs-template` (bin "geosteiner-rs-template") due to previous error

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.