Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build in separate directory failure fix #617

Merged
merged 5 commits into from
Aug 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -86,13 +86,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