Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
Signed-off-by: Andrew Stein <[email protected]>
  • Loading branch information
texodus committed Oct 14, 2024
1 parent b658eec commit 871beb5
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 5 deletions.
1 change: 1 addition & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions rust/generate-metadata/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@ bench = false
version = "10.0.0"
features = ["serde-json-impl", "no-serde-warnings"]

[dependencies.perspective-server]
path = "../perspective-server"
features = ["external-cpp", "disable-cpp"]

[dependencies.perspective-client]
path = "../perspective-client"
features = ["external-proto", "omit_metadata"]
Expand Down
2 changes: 1 addition & 1 deletion rust/perspective-js/build.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ function get_host() {
function build_rust() {
const release_flag = IS_DEBUG ? "" : "--release";
execSync(
`PSP_ROOT_DIR=../.. cargo bundle --target=${get_host()} -- perspective_js ${release_flag} --features=export-init,external-cpp`,
`PSP_ROOT_DIR=../.. cargo bundle --target=${get_host()} -- perspective_js ${release_flag} --features=export-init`,
INHERIT
);
}
Expand Down
2 changes: 1 addition & 1 deletion rust/perspective-python/build.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ if (build_wheel) {
flags += " -vv";
}

cmd.sh(`maturin build ${flags} --features=external-cpp ${target}`);
cmd.sh(`maturin build ${flags} ${target}`);
}

const old = fs.readFileSync("./pyproject.toml");
Expand Down
3 changes: 1 addition & 2 deletions rust/perspective-server/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,7 @@ default = ["python"]
external-cpp = []
wasm-exceptions = []
python = []
export-cpp-only = []
no-build-cpp = []
disable-cpp = []

[build-dependencies]
cmake = "0.1.50"
Expand Down
4 changes: 3 additions & 1 deletion rust/perspective-server/build/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,9 @@ fn main() -> Result<(), std::io::Error> {
return Ok(());
}

if std::option_env!("PSP_DISABLE_CPP").is_none() {
if std::option_env!("PSP_DISABLE_CPP").is_none()
&& std::option_env!("CARGO_FEATURE_DISABLE_CPP").is_none()
{
if let Some(artifact_dir) = psp::cmake_build()? {
psp::cmake_link_deps(&artifact_dir)?;
}
Expand Down

0 comments on commit 871beb5

Please sign in to comment.