diff --git a/records/build.sh b/records/build.sh index b65fd37..40a6e22 100755 --- a/records/build.sh +++ b/records/build.sh @@ -1,15 +1,18 @@ -#!/usr/bin/env bash +#!/bin/sh set -o errexit -o nounset -o pipefail # This script builds all subprojects and puts all created Wasm modules in one dir cd effector -cargo update -fce build --release +cargo update --aggressive +marine build --release + cd ../pure -cargo update -fce build --release +cargo update --aggressive +marine build --release cd .. -rm artifacts/* -cp ../../target/wasm32-wasi/release/records_effector.wasm artifacts/ -cp ../../target/wasm32-wasi/release/records_pure.wasm artifacts/ + +mkdir -p artifacts +rm -f artifacts/*.wasm +cp effector/target/wasm32-wasi/release/records_effector.wasm artifacts/ +cp pure/target/wasm32-wasi/release/records_pure.wasm artifacts/ diff --git a/records/effector/Cargo.toml b/records/effector/Cargo.toml index 2ee8518..f1204a9 100644 --- a/records/effector/Cargo.toml +++ b/records/effector/Cargo.toml @@ -10,5 +10,5 @@ name = "records_effector" path = "src/main.rs" [dependencies] -fluence = { version = "=0.5.0", features = ["logger"]} -test-record = { path = "../test-record" } +fluence = "0.6.9" +test-record = { path = "../test-record" } \ No newline at end of file diff --git a/records/effector/src/main.rs b/records/effector/src/main.rs index 9973b2c..1e170c0 100644 --- a/records/effector/src/main.rs +++ b/records/effector/src/main.rs @@ -14,7 +14,7 @@ * limitations under the License. */ -use fluence::fce; +use fluence::marine; use fluence::module_manifest; use test_record::TestRecord; @@ -23,7 +23,7 @@ module_manifest!(); pub fn main() {} -#[fce] +#[marine] pub fn mutate_struct(mut test_record: test_record::TestRecord) -> TestRecord { test_record.field_0 = true; test_record.field_1 = 1; diff --git a/records/pure/Cargo.toml b/records/pure/Cargo.toml index 07e3fdc..e225fbb 100644 --- a/records/pure/Cargo.toml +++ b/records/pure/Cargo.toml @@ -10,5 +10,5 @@ name = "records_pure" path = "src/main.rs" [dependencies] -fluence = { version = "=0.5.0", features = ["logger"]} -test-record = { path = "../test-record" } +fluence = "0.6.9" +test-record = { path = "../test-record" } \ No newline at end of file diff --git a/records/pure/src/main.rs b/records/pure/src/main.rs index 2e1f3b6..5afc149 100644 --- a/records/pure/src/main.rs +++ b/records/pure/src/main.rs @@ -16,7 +16,7 @@ #![allow(improper_ctypes)] -use fluence::fce; +use fluence::marine; use fluence::module_manifest; use test_record::TestRecord; @@ -25,7 +25,7 @@ module_manifest!(); pub fn main() {} -#[fce] +#[marine] pub fn invoke() -> TestRecord { let test_record = TestRecord { field_0: false, @@ -43,10 +43,10 @@ pub fn invoke() -> TestRecord { field_12: Vec::new(), }; - unsafe { mutate_struct(test_record) } + mutate_struct(test_record) } -#[fce] +#[marine] #[link(wasm_import_module = "records_effector")] extern "C" { pub fn mutate_struct(test_record: TestRecord) -> TestRecord; diff --git a/records/test-record/Cargo.toml b/records/test-record/Cargo.toml index b7979b7..b5c023b 100644 --- a/records/test-record/Cargo.toml +++ b/records/test-record/Cargo.toml @@ -10,4 +10,4 @@ name = "test_record" path = "src/test_record.rs" [dependencies] -fluence = "=0.5.0" +fluence = "=0.6.9" diff --git a/records/test-record/src/test_record.rs b/records/test-record/src/test_record.rs index d604149..ec3693b 100644 --- a/records/test-record/src/test_record.rs +++ b/records/test-record/src/test_record.rs @@ -14,7 +14,9 @@ * limitations under the License. */ -#[fluence::fce] +use fluence::marine; + +#[marine] pub struct TestRecord { pub field_0: bool, pub field_1: i8,