Cant run in-process server in rust as per axum example #2684
Replies: 3 comments 5 replies
-
I’m not experienced with make but it seems like the CMAKE_BIN_DIR may change when running cargo build from my project vs. pnpm run build in the perspective project root. When I run pnpm run build, the perspective project compiles successfully, when I run cargo build in my project, I get the above error |
Beta Was this translation helpful? Give feedback.
-
@danielblignaut appreciate your interest in the (new!) Rust library. You should be able to start the example rust server like so (it will compile the library itself):
We have not officially released the crate yet, so it should be considered incomplete [though truthfully, the only PRs open in this milestone are for sibling packages). There is an older patch available on crates.io @ 3.0.0-alpha.1 but it is very different from Some other suggestions to get you started:
Perspective uses the
The old docs describe the similar workflow from the previous release, though there was no Rust library in the last release and you'll have to mentally replace |
Beta Was this translation helpful? Give feedback.
-
hey @texodus, Thanks for the feedback. I've got the rust websocket server running locally now and can establish websocket connections to it however the first message the browser tries to send not a buffer, it tries to send a JSON payload:
which the rust server doesn't like:
This seems to be the case even when running the index.html file in the rust example - is there something I am missing or prospectively a bug that needs to be handled in the rust server to manage this message type in the above line reference? |
Beta Was this translation helpful? Give feedback.
-
Bug Report
I am running a Rust axum server and trying to launch an in-process perspective server in Rust (as per https://github.com/finos/perspective/blob/master/examples/rust-axum/src/main.rs )
The perspective crate in rust is the perspective-js crate, not the rust/perspective crate ( https://crates.io/crates/perspective ) so we have to point to the git version of the rust library, therefore we do the following below:
Steps to Reproduce:
Expected Result:
Expect to be able to use the perspective rust library to start an in-process perspective server from Rust
Actual Result:
Various Failures:
CMake Error at /Users/danielblignaut/Documents/Development/trading/perspective/rust/perspective-server/cmake/modules/FindInstallDependency.cmake:42 (configure_file):
Not a directory
Call Stack (most recent call first):
CMakeLists.txt:401 (psp_build_dep)
CMake Error at /Users/danielblignaut/Documents/Development/trading/perspective/rust/perspective-server/cmake/modules/FindInstallDependency.cmake:43 (add_subdirectory):
add_subdirectory given source
"/Users/danielblignaut/Documents/Development/trading/rust/target/debug/build/perspective-server-2350c75ef25453d6/out/build/arrow-src/cpp/"
which is not an existing directory.
Call Stack (most recent call first):
CMakeLists.txt:401 (psp_build_dep)
CMake Error at /Users/danielblignaut/Documents/Development/trading/perspective/rust/perspective-server/cmake/modules/FindInstallDependency.cmake:82 (target_compile_options):
Cannot specify compile options for target "arrow" which is not built by
this project.
Call Stack (most recent call first):
CMakeLists.txt:401 (psp_build_dep)
Beta Was this translation helpful? Give feedback.
All reactions