Skip to content

Commit

Permalink
minor tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
xxchan committed Apr 29, 2023
1 parent 7924834 commit f2f55e8
Show file tree
Hide file tree
Showing 11 changed files with 12 additions and 433 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,18 +13,7 @@ mod test {

const SM_AGGEGRATE: &str = "fluvio_smartmodule_aggregate";

cfg_if::cfg_if! {

if #[cfg(feature = "wasmtime-engine")] {
type AggregateTransform =
crate::engine::common::AggregateTransform<crate::engine::wasmtime::instance::WasmtimeFn>;
} else if #[cfg(feature = "wasmedge-engine")] {
type AggregateTransform =
crate::engine::common::AggregateTransform<crate::engine::wasmedge::instance::WasmEdgeFn>;
} else {
compile_error!("no engine specified");
}
}
type AggregateTransform = crate::engine::common::AggregateTransform<crate::engine::WasmFnImp>;

#[ignore]
#[test]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ mod test {
const SM_FILTER: &str = "fluvio_smartmodule_filter";
const SM_FILTER_INIT: &str = "fluvio_smartmodule_filter_init";

// #[ignore]
#[ignore]
#[test]
fn test_filter() {
let engine = SmartEngine::new();
Expand Down
4 changes: 4 additions & 0 deletions crates/fluvio-smartengine/src/engine/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -100,9 +100,13 @@ cfg_if::cfg_if! {
if #[cfg(feature = "wasmtime-engine")] {
pub(crate) mod wasmtime;
use self::wasmtime::{SmartEngineImp, initialize_imp, SmartModuleChainInstanceImp};
#[cfg(test)]
use self::wasmtime::WasmFnImp;
} else if #[cfg(feature = "wasmedge-engine")] {
pub(crate) mod wasmedge;
use self::wasmedge::{SmartEngineImp, initialize_imp, SmartModuleChainInstanceImp};
#[cfg(test)]
use self::wasmedge::WasmFnImp;
} else {
compile_error!("no engine specified");
}
Expand Down
4 changes: 3 additions & 1 deletion crates/fluvio-smartengine/src/engine/wasmedge/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,7 @@
mod imp;
pub use imp::{SmartEngineImp, initialize_imp, SmartModuleChainInstanceImp};
/// Implementations of the traits in `common` for the WasmEdge engine
pub(crate) mod instance;
mod instance;
#[cfg(test)]
pub use instance::WasmEdgeFn as WasmFnImp;
mod memory;
4 changes: 3 additions & 1 deletion crates/fluvio-smartengine/src/engine/wasmtime/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
mod imp;
pub use imp::{SmartEngineImp, initialize_imp, SmartModuleChainInstanceImp};
/// Implementations of the traits in `common` for the Wasmtime engine
pub(crate) mod instance;
mod instance;
#[cfg(test)]
pub use instance::WasmtimeFn as WasmFnImp;
mod memory;
mod state;
134 changes: 0 additions & 134 deletions crates/fluvio-smartengine/src/engine/wasmtime/transforms/aggregate.rs

This file was deleted.

This file was deleted.

143 changes: 0 additions & 143 deletions crates/fluvio-smartengine/src/engine/wasmtime/transforms/filter.rs

This file was deleted.

Loading

0 comments on commit f2f55e8

Please sign in to comment.