Skip to content

Commit

Permalink
chore: update ink-stroke-modeler, absl, cargo deps
Browse files Browse the repository at this point in the history
  • Loading branch information
flxzt committed Mar 23, 2024
1 parent c0ee2b0 commit f5c4182
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 21 deletions.
18 changes: 9 additions & 9 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,16 @@ rust-version = "1.65"
build = "build.rs"

[dependencies]
autocxx = "0.26"
cxx = "1"
thiserror = "1"
autocxx = "0.26.0"
cxx = "1.0"
thiserror = "1.0"

[build-dependencies]
autocxx-build = "0.26"
cmake = "0.1"
miette = {version = "5", features = ["fancy"] }
path-slash = "0.2"
autocxx-build = "0.26.0"
cmake = "0.1.50"
miette = {version = "7.2", features = ["fancy"] }
path-slash = "0.2.1"

[dev-dependencies]
anyhow = "1"
svg = "0.13"
anyhow = "1.0"
svg = "0.16.0"
2 changes: 1 addition & 1 deletion abseil-cpp
Submodule abseil-cpp updated 360 files
19 changes: 10 additions & 9 deletions build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,15 @@ fn main() -> miette::Result<()> {
let install_lib_dir = out_dir.join("lib");
let install_include_dir = out_dir.join("include");

let bindings_files = vec![
let bindings_files = [
PathBuf::from("build.rs"),
PathBuf::from("src/lib.rs"),
PathBuf::from("include/extras.h"),
];
let bindings_cpp_sources = vec![PathBuf::from("src/extras.cc")];
let bindings_cpp_sources = [PathBuf::from("src/extras.cc")];

let _absl_cmake_install_dir = cmake::Config::new("abseil-cpp")
// this avoids having to link to `dbghelp` on windows-mingw
// This avoids having to link to `dbghelp` on windows-mingw
.profile("Release")
.define("CMAKE_CXX_STANDARD", "20")
// Rust needs -fPIE or -fPIC
Expand All @@ -37,13 +37,13 @@ fn main() -> miette::Result<()> {
.define("BUILD_TESTING", "OFF")
.define("BUILD_SHARED_LIBS", "OFF")
.define("ABSL_PROPAGATE_CXX_STD", "ON")
// this forces absl stdcpp waiter implementation (see `absl/synchronization/internal/waiter.h`).
// this possibly circumvents build failure with mingw. see: https://github.com/abseil/abseil-cpp/issues/1510
// This forces absl stdcpp waiter implementation (see `absl/synchronization/internal/waiter.h`).
// It possibly circumvents build failure with mingw. see: https://github.com/abseil/abseil-cpp/issues/1510
.cxxflag("-DABSL_FORCE_WAITER_MODE=4")
.build();

let _ink_stroke_modeler_cmake_install_dir = cmake::Config::new("ink-stroke-modeler")
// this avoids having to link to `dbghelp` on windows-mingw
// This avoids having to link to `dbghelp` on windows-mingw
.profile("Release")
.define("CMAKE_CXX_STANDARD", "20")
// Rust needs -fPIE or -fPIC
Expand All @@ -68,7 +68,7 @@ fn main() -> miette::Result<()> {
.define("INK_STROKE_MODELER_ENABLE_INSTALL", "ON")
.build();

let include_paths = vec![
let include_paths = [
PathBuf::from("include"),
//PathBuf::from("absl-cpp"),
//PathBuf::from("ink-stroke-modeler"),
Expand All @@ -78,11 +78,12 @@ fn main() -> miette::Result<()> {
let mut builder =
autocxx_build::Builder::new(PathBuf::from("src/lib.rs"), include_paths.iter())
.extra_clang_args(&["-std=gnu++20"])
.build()?;
.build()
.into_diagnostic()?;
builder
//.flag_if_supported("-v")
.flag_if_supported("-std=gnu++20")
// include paths already passed in by the autocxx builder
// These include paths are already passed in by the autocxx builder
//.includes(include_paths.iter())
//.cpp_set_stdlib(Some("stdc++"))
.files(bindings_cpp_sources.iter())
Expand Down
2 changes: 1 addition & 1 deletion ink-stroke-modeler
Submodule ink-stroke-modeler updated 42 files
+6 −2 .bazelrc
+4 −0 .github/workflows/cmake-test.yaml
+52 −34 CMakeLists.txt
+61 −0 MODULE.bazel
+3 −3 WORKSPACE
+30 −0 extensions.bzl
+40 −22 ink_stroke_modeler/BUILD.bazel
+46 −27 ink_stroke_modeler/CMakeLists.txt
+60 −38 ink_stroke_modeler/internal/BUILD.bazel
+75 −52 ink_stroke_modeler/internal/CMakeLists.txt
+23 −0 ink_stroke_modeler/internal/internal_types.cc
+15 −18 ink_stroke_modeler/internal/internal_types.h
+28 −0 ink_stroke_modeler/internal/internal_types_test.cc
+68 −0 ink_stroke_modeler/internal/position_modeler.cc
+13 −16 ink_stroke_modeler/internal/position_modeler.h
+175 −2 ink_stroke_modeler/internal/position_modeler_test.cc
+4 −0 ink_stroke_modeler/internal/prediction/BUILD.bazel
+7 −3 ink_stroke_modeler/internal/prediction/CMakeLists.txt
+11 −11 ink_stroke_modeler/internal/prediction/kalman_filter/BUILD.bazel
+16 −16 ink_stroke_modeler/internal/prediction/kalman_filter/CMakeLists.txt
+5 −3 ink_stroke_modeler/internal/prediction/kalman_predictor.cc
+1 −1 ink_stroke_modeler/internal/prediction/kalman_predictor.h
+10 −10 ink_stroke_modeler/internal/prediction/kalman_predictor_test.cc
+1 −1 ink_stroke_modeler/internal/prediction/stroke_end_predictor.h
+3 −0 ink_stroke_modeler/internal/prediction/stroke_end_predictor_test.cc
+0 −2 ink_stroke_modeler/internal/stylus_state_modeler_test.cc
+0 −42 ink_stroke_modeler/internal/utils.h
+2 −1 ink_stroke_modeler/internal/utils_test.cc
+10 −6 ink_stroke_modeler/internal/validation.h
+1 −0 ink_stroke_modeler/internal/validation_test.cc
+1 −0 ink_stroke_modeler/internal/wobble_smoother.cc
+21 −9 ink_stroke_modeler/params.cc
+10 −2 ink_stroke_modeler/params.h
+23 −1 ink_stroke_modeler/params_test.cc
+9 −21 ink_stroke_modeler/stroke_modeler.cc
+1 −0 ink_stroke_modeler/stroke_modeler.h
+80 −0 ink_stroke_modeler/stroke_modeler_fuzz_test.cc
+1 −0 ink_stroke_modeler/stroke_modeler_test.cc
+65 −1 ink_stroke_modeler/types.cc
+65 −28 ink_stroke_modeler/types.h
+198 −1 ink_stroke_modeler/types_test.cc
+0 −70 workspace.bzl
2 changes: 1 addition & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
//! Unofficial Rust bindings for the [ink-stroke-modeler](https://github.com/google/ink-stroke-modeler) C++ library.
//! Using [autocxx](https://crates.io/crates/autocxx).
// Because we can't silence the lint for the Input_EventType type generated by autocxx, we need to set it here.
// Because we can't silence the lint for the Input_EventType type generated by autocxx, we need to set it here
#![allow(clippy::enum_variant_names)]

use autocxx::prelude::*;
Expand Down

0 comments on commit f5c4182

Please sign in to comment.