Skip to content

Commit

Permalink
build in separate directory failure fix (#617)
Browse files Browse the repository at this point in the history
* test for build in separate directory

* builds dir from ci variable

* using CI_PROJECT_DIR variable

* relarive build examples

* updated "time" version, suppressed "unused trait" warnings
  • Loading branch information
milyin authored Aug 23, 2024
1 parent 387dac6 commit 28518e8
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 14 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -88,13 +88,13 @@ jobs:
cd build
cmake --build . --target examples
- name: Build examples with zenoh-c as subbroject and static library and in debug mode
- name: Build examples with zenoh-c as subbroject and static library and in debug mode and in separate directory
shell: bash
run: |
mkdir -p build_examples && cd build_examples
cmake ../examples -DCMAKE_BUILD_TYPE=Debug -DZENOHC_LIB_STATIC=TRUE
cmake --build . --config Debug
cd .. && rm -rf build_examples
mkdir -p ../build_examples
cmake -S examples -B ../build_examples -DCMAKE_BUILD_TYPE=Debug -DZENOHC_LIB_STATIC=TRUE
cmake --build ../build_examples --config Debug
rm -rf ../build_examples
- name: Build examples with zenoh-c as installed package
shell: bash
Expand Down
34 changes: 26 additions & 8 deletions Cargo.lock

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

11 changes: 10 additions & 1 deletion src/transmute.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,48 +14,57 @@

use std::mem::MaybeUninit;

#[allow(dead_code)]
pub(crate) trait CTypeRef: Sized {
type CType;
fn as_ctype_ref(&self) -> &Self::CType;
fn as_ctype_mut(&mut self) -> &mut Self::CType;
}
#[allow(dead_code)]
pub(crate) trait OwnedCTypeRef: Sized {
type OwnedCType;
fn as_owned_c_type_ref(&self) -> &Self::OwnedCType;
fn as_owned_c_type_mut(&mut self) -> &mut Self::OwnedCType;
}
#[allow(dead_code)]
pub(crate) trait LoanedCTypeRef: Sized {
type LoanedCType;
fn as_loaned_c_type_ref(&self) -> &Self::LoanedCType;
fn as_loaned_c_type_mut(&mut self) -> &mut Self::LoanedCType;
}
#[allow(dead_code)]
pub(crate) trait ViewCTypeRef: Sized {
type ViewCType;
fn as_view_c_type_ref(&self) -> &Self::ViewCType;
fn as_view_c_type_mut(&mut self) -> &mut Self::ViewCType;
}
#[allow(dead_code)]
pub(crate) trait RustTypeRef: Sized {
type RustType;
fn as_rust_type_ref(&self) -> &Self::RustType;
fn as_rust_type_mut(&mut self) -> &mut Self::RustType;
}
#[allow(dead_code)]
pub(crate) trait RustTypeRefUninit: Sized {
type RustType;
fn as_rust_type_mut_uninit(&mut self) -> &mut MaybeUninit<Self::RustType>;
}
#[allow(dead_code)]
pub(crate) trait IntoRustType: Sized {
type RustType;
fn into_rust_type(self) -> Self::RustType;
}
#[allow(dead_code)]
pub(crate) trait IntoCType: Sized {
type CType;
fn into_c_type(self) -> Self::CType;
}

#[allow(dead_code)]
pub(crate) trait TakeRustType: Sized {
type RustType;
fn take_rust_type(&mut self) -> Self::RustType;
}
#[allow(dead_code)]
pub(crate) trait TakeCType: Sized {
type CType;
fn take_c_type(&mut self) -> Self::CType;
Expand Down

0 comments on commit 28518e8

Please sign in to comment.