Skip to content

Cant run in-process server in rust as per axum example #2683

Description

@danielblignaut

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:

  1. have an existing rust workspace project
  2. git clone https://github.com/finos/perspective
  3. cd perspective
  4. git checkout tkp/fixes
  5. brew install cmake maturin
  6. python -m venv perspective_venv
  7. source perspective_venv/bin/activate
  8. pip install jupyterlab
  9. pnpm install
  10. pnpm run build
  11. in the root rust workspace project, edit Cargo.toml: perspective = { path = "./../perspective/rust/perspective" }
  12. run cargo build

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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions