Update crate info; housekeeping (#153)

This commit is contained in:
Mike Voronov 2021-10-05 20:08:10 +03:00 committed by GitHub
parent e99c352a95
commit f291c77d26
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
22 changed files with 76 additions and 126 deletions

View File

@ -67,7 +67,7 @@ jobs:
PAT="\\\\d+.\\\\d+.\\\\d+" PAT="\\\\d+.\\\\d+.\\\\d+"
INTERPRETER_CARGO_TOML="air-interpreter/Cargo.toml" INTERPRETER_CARGO_TOML="air-interpreter/Cargo.toml"
CARGO_TOML="crates/air-interpreter-wasm/Cargo.toml" CARGO_TOML="crates/interpreter-wasm/Cargo.toml"
PACKAGE_JSON="avm/client/package.json" PACKAGE_JSON="avm/client/package.json"
# get package name from Cargo.toml # get package name from Cargo.toml
@ -145,21 +145,21 @@ jobs:
run: marine build --release -p air-interpreter --features marine run: marine build --release -p air-interpreter --features marine
working-directory: air-interpreter working-directory: air-interpreter
- name: Copy air_interpreter_server.wasm to air-interpreter-wasm - name: Copy air_interpreter_server.wasm to interpreter-wasm
run: cp target/wasm32-wasi/release/air_interpreter_server.wasm crates/air-interpreter-wasm/air_interpreter_server.wasm run: cp target/wasm32-wasi/release/air_interpreter_server.wasm crates/interpreter-wasm/air_interpreter_server.wasm
- name: Set project version to ${{ env.FINAL_VERSION }} - name: Set project version to ${{ env.FINAL_VERSION }}
run: | run: |
PATH="~/.cargo/bin:$PATH" PATH="~/.cargo/bin:$PATH"
toml set Cargo.toml package.version "${{ env.FINAL_VERSION }}" | sponge Cargo.toml toml set Cargo.toml package.version "${{ env.FINAL_VERSION }}" | sponge Cargo.toml
working-directory: crates/air-interpreter-wasm working-directory: crates/interpreter-wasm
- name: Login to crates.io - name: Login to crates.io
run: cargo login ${{ secrets.CRATES_IO_TOKEN }} run: cargo login ${{ secrets.CRATES_IO_TOKEN }}
- name: Publish to crates.io - name: Publish to crates.io
run: cargo publish --allow-dirty run: cargo publish --allow-dirty
working-directory: crates/air-interpreter-wasm working-directory: crates/interpreter-wasm
### Create a pre-release ### Create a pre-release
- name: Create Release - name: Create Release

View File

@ -72,7 +72,7 @@ jobs:
PATH="$(yarn global bin):$PATH" PATH="$(yarn global bin):$PATH"
INTERPRETER_CARGO_TOML="air-interpreter/Cargo.toml" INTERPRETER_CARGO_TOML="air-interpreter/Cargo.toml"
CARGO_TOML="crates/air-interpreter-wasm/Cargo.toml" CARGO_TOML="crates/interpreter-wasm/Cargo.toml"
PACKAGE_JSON="avm/client/package.json" PACKAGE_JSON="avm/client/package.json"
# sanitize branch name so it can be used as a semver suffix (replace [^0-9a-zA-Z-] with hyphen) # sanitize branch name so it can be used as a semver suffix (replace [^0-9a-zA-Z-] with hyphen)
@ -168,8 +168,8 @@ jobs:
run: marine build -p air-interpreter --release --features marine run: marine build -p air-interpreter --release --features marine
working-directory: air-interpreter working-directory: air-interpreter
- name: Copy air_interpreter_server.wasm to air-interpreter-wasm - name: Copy air_interpreter_server.wasm to interpreter-wasm
run: cp target/wasm32-wasi/release/air_interpreter_server.wasm crates/air-interpreter-wasm/air_interpreter_server.wasm run: cp target/wasm32-wasi/release/air_interpreter_server.wasm crates/interpreter-wasm/air_interpreter_server.wasm
- name: Set project name@version to ${{ env.PKG_NAME }}@${{ env.FINAL_VERSION }} - name: Set project name@version to ${{ env.PKG_NAME }}@${{ env.FINAL_VERSION }}
run: | run: |
@ -178,11 +178,11 @@ jobs:
NAME=$(toml get Cargo.toml package.name | jq -r .) NAME=$(toml get Cargo.toml package.name | jq -r .)
toml set Cargo.toml package.name "${{ env.PKG_NAME }}" | sponge Cargo.toml toml set Cargo.toml package.name "${{ env.PKG_NAME }}" | sponge Cargo.toml
working-directory: crates/air-interpreter-wasm working-directory: crates/interpreter-wasm
- name: Login to crates.io - name: Login to crates.io
run: cargo login ${{ secrets.CRATES_IO_TOKEN }} run: cargo login ${{ secrets.CRATES_IO_TOKEN }}
- name: Publish to crates.io - name: Publish to crates.io
run: cargo publish --allow-dirty run: cargo publish --allow-dirty
working-directory: crates/air-interpreter-wasm working-directory: crates/interpreter-wasm

View File

@ -74,23 +74,23 @@ and it's possible to address its fields separately: `%last_error%.$.instruction`
## Version 0.1.3 (2020-11-11) ## Version 0.1.3 (2020-11-11)
- Switched to the new LALRPOP parser ([PR 13](https://github.com/fluencelabs/air/pull/13)): - Switched to the new LALRPOP parser ([PR 13](https://github.com/fluencelabs/aquavm/pull/13)):
- arguments should be wrapped with square braces [] - arguments should be wrapped with square braces []
- empty results in call allowed and lead to forget a call result - empty results in call allowed and lead to forget a call result
- Added a few benchmarks - Added a few benchmarks
- Fixed behaviour of the Xor instruction with inner Par instructions ([PR 19](https://github.com/fluencelabs/air/pull/19)) - Fixed behaviour of the Xor instruction with inner Par instructions ([PR 19](https://github.com/fluencelabs/aquavm/pull/19))
- Iterator in the Fold becomes resolvable ([PR 23](https://github.com/fluencelabs/air/pull/23)) - Iterator in the Fold becomes resolvable ([PR 23](https://github.com/fluencelabs/aquavm/pull/23))
## Version 0.1.2 (2020-10-29) ## Version 0.1.2 (2020-10-29)
- Added new data format ([PR 12](https://github.com/fluencelabs/air/pull/12)): - Added new data format ([PR 12](https://github.com/fluencelabs/aquavm/pull/12)):
- previously data was a hashmap with variable names to values, and now it is call evidence path that contains call and par evidence states - previously data was a hashmap with variable names to values, and now it is call evidence path that contains call and par evidence states
- logger is refactored and supports now several log targets - logger is refactored and supports now several log targets
- interpreter decoupled into two crates: `interpreter-lib` and `interpreter`. To build it for the FCE target the `fce` feature should be specified (`fce build --features fce`) - interpreter decoupled into two crates: `interpreter-lib` and `interpreter`. To build it for the FCE target the `fce` feature should be specified (`fce build --features fce`)
## Version 0.1.1 (2020-10-23) ## Version 0.1.1 (2020-10-23)
- Added join behaviour ([PR 11](https://github.com/fluencelabs/air/pull/11)): - Added join behaviour ([PR 11](https://github.com/fluencelabs/aquavm/pull/11)):
- if `call` uses non existing variable, it is just being passed and isn't executed without any error - if `call` uses non existing variable, it is just being passed and isn't executed without any error
- `par` becomes completed when at least one of its subtree is completed - `par` becomes completed when at least one of its subtree is completed

51
Cargo.lock generated
View File

@ -96,13 +96,6 @@ dependencies = [
"thiserror", "thiserror",
] ]
[[package]]
name = "air-test-module"
version = "0.1.0"
dependencies = [
"marine-rs-sdk",
]
[[package]] [[package]]
name = "air-test-utils" name = "air-test-utils"
version = "0.2.1" version = "0.2.1"
@ -698,9 +691,9 @@ checksum = "37ab347416e802de484e4d03c7316c48f1ecb56574dfd4a46a80f173ce1de04d"
[[package]] [[package]]
name = "fluence-app-service" name = "fluence-app-service"
version = "0.9.0" version = "0.10.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "58d92fd37b7673513efafb0d1e0c366b8d6f297b74e9bfcda27c452f400af70a" checksum = "056981dd5707a42412774d0b95629898f21dbce129b99835ac3f59d39b4a5760"
dependencies = [ dependencies = [
"fluence-faas", "fluence-faas",
"log", "log",
@ -714,9 +707,9 @@ dependencies = [
[[package]] [[package]]
name = "fluence-faas" name = "fluence-faas"
version = "0.9.0" version = "0.9.2"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "87e91fe7deca2726f7bdca5ba59ecb68ab27282078fccf160fd4faefa9283f19" checksum = "3fe120218635fd3055bdf3f7e4cf765e2e72866874818bd10f40e2abde882326"
dependencies = [ dependencies = [
"cmd_lib", "cmd_lib",
"itertools 0.9.0", "itertools 0.9.0",
@ -1048,9 +1041,9 @@ checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646"
[[package]] [[package]]
name = "leb128" name = "leb128"
version = "0.2.4" version = "0.2.5"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3576a87f2ba00f6f106fdfcd16db1d698d648a26ad8e0573cad8537c3c362d2a" checksum = "884e2677b40cc8c339eaefcb701c32ef1fd2493d71118dc0ca4b6a736c93bd67"
[[package]] [[package]]
name = "lexical-core" name = "lexical-core"
@ -1106,9 +1099,9 @@ checksum = "3e2e65a1a2e43cfcb47a895c4c8b10d1f4a61097f9f254f183aee60cad9c651d"
[[package]] [[package]]
name = "marine-it-generator" name = "marine-it-generator"
version = "0.5.4" version = "0.5.6"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e7b40920a86fb49456f0e94862d56a8e0bfc22489e518d894628da0f3ade03d8" checksum = "890b228b9151e9dff213501986f564445a2f9ca5a706088b5d900f5ecf67f7e7"
dependencies = [ dependencies = [
"cargo_toml", "cargo_toml",
"it-lilo", "it-lilo",
@ -1134,9 +1127,9 @@ dependencies = [
[[package]] [[package]]
name = "marine-it-parser" name = "marine-it-parser"
version = "0.6.6" version = "0.6.8"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4154fc98fcfeba65a45d774cff6eeb8bddc8aa66e897f46a74dc95e8823771ea" checksum = "edd97bd85072fc540763769be153a7c8ee83391e668b37ef96d6c48decec2cd5"
dependencies = [ dependencies = [
"anyhow", "anyhow",
"itertools 0.10.1", "itertools 0.10.1",
@ -1176,9 +1169,9 @@ dependencies = [
[[package]] [[package]]
name = "marine-module-info-parser" name = "marine-module-info-parser"
version = "0.2.0" version = "0.2.2"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b4a0951d77c38171d8b2ddcc888d1153a2c4f777b3b7a7dca093a06c69b32d77" checksum = "0ec8f4ab2eeeb5c1d66d9b56fe6b0b5bf39820aa8cc2f1d7be42bdf95654d529"
dependencies = [ dependencies = [
"anyhow", "anyhow",
"chrono", "chrono",
@ -1192,9 +1185,9 @@ dependencies = [
[[package]] [[package]]
name = "marine-module-interface" name = "marine-module-interface"
version = "0.1.5" version = "0.1.6"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "035fb5d160a50cbcbe244a343081550f689ceba945d95281bbe207d98bf25586" checksum = "06bc36ef268bf7436916f1fa9b0c84104692a717ea5eef3c90b9f25c3407f6b7"
dependencies = [ dependencies = [
"anyhow", "anyhow",
"itertools 0.10.1", "itertools 0.10.1",
@ -1233,9 +1226,9 @@ dependencies = [
[[package]] [[package]]
name = "marine-runtime" name = "marine-runtime"
version = "0.7.0" version = "0.7.2"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b27b0f7162a3a1ee314fc3ed46b424b2dd988849bdc17085dbacacfb820bc3be" checksum = "983262d394c59d4321b141e303eb55015bc412f319d54bbad7f253e4583253b2"
dependencies = [ dependencies = [
"anyhow", "anyhow",
"boolinator", "boolinator",
@ -1584,9 +1577,9 @@ checksum = "a1d01941d82fa2ab50be1e79e6714289dd7cde78eba4c074bc5a4374f650dfe0"
[[package]] [[package]]
name = "quote" name = "quote"
version = "1.0.9" version = "1.0.10"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c3d0b9745dc2debf507c8422de05d7226cc1f0644216dfdfead988f9b1ab32a7" checksum = "38bc8cc6a5f2e3655e0899c1b848643b2562f853f114bfec7be120678e3ace05"
dependencies = [ dependencies = [
"proc-macro2", "proc-macro2",
] ]
@ -1770,9 +1763,9 @@ dependencies = [
[[package]] [[package]]
name = "serde" name = "serde"
version = "1.0.118" version = "1.0.130"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "06c64263859d87aa2eb554587e2d23183398d617427327cf2b3d0ed8c69e4800" checksum = "f12d06de37cf59146fbdecab66aa99f9fe4f78722e3607577a5375d66bd0c913"
dependencies = [ dependencies = [
"serde_derive", "serde_derive",
] ]
@ -1808,9 +1801,9 @@ dependencies = [
[[package]] [[package]]
name = "serde_derive" name = "serde_derive"
version = "1.0.118" version = "1.0.130"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c84d3526699cd55261af4b941e4e725444df67aa4f9e6a3564f18030d12672df" checksum = "d7bc1a1ab1961464eae040d96713baa5a724a8152c1222492465b54322ec508b"
dependencies = [ dependencies = [
"proc-macro2", "proc-macro2",
"quote", "quote",

View File

@ -11,13 +11,12 @@ members = [
"crates/air-lib/test-utils", "crates/air-lib/test-utils",
"crates/air-lib/trace-handler", "crates/air-lib/trace-handler",
"crates/data-store", "crates/data-store",
"crates/test-module",
] ]
exclude = [ exclude = [
"air/tests/test_module/integration/security_tetraplets/auth_module", "air/tests/test_module/integration/security_tetraplets/auth_module",
"air/tests/test_module/integration/security_tetraplets/log_storage", "air/tests/test_module/integration/security_tetraplets/log_storage",
"crates/air-interpreter-wasm", "crates/interpreter-wasm",
] ]
[profile.release] [profile.release]

View File

@ -1,9 +1,12 @@
[package] [package]
name = "air-interpreter" name = "air-interpreter"
version = "0.15.0" version = "0.15.0"
description = "Crate-wrapper for air"
authors = ["Fluence Labs"] authors = ["Fluence Labs"]
edition = "2018" edition = "2018"
publish = false publish = false
keywords = ["fluence", "air", "webassembly", "programming-language"]
categories = ["wasm"]
[lib] [lib]
name = "air_interpreter_client" name = "air_interpreter_client"

View File

@ -1,9 +1,12 @@
[package] [package]
name = "air" name = "air"
version = "0.15.0" version = "0.15.0"
description = "Implementation of the AIR interpreter"
authors = ["Fluence Labs"] authors = ["Fluence Labs"]
edition = "2018" edition = "2018"
publish = false publish = false
keywords = ["fluence", "air", "webassembly", "programming-language"]
categories = ["wasm"]
[lib] [lib]
name = "air" name = "air"
@ -35,7 +38,7 @@ wasm-bindgen = "=0.2.65"
[dev_dependencies] [dev_dependencies]
air-test-utils = { path = "../crates/air-lib/test-utils" } air-test-utils = { path = "../crates/air-lib/test-utils" }
fluence-app-service = "0.9.0" fluence-app-service = "0.10.1"
criterion = "0.3.3" criterion = "0.3.3"
csv = "1.1.5" csv = "1.1.5"

View File

@ -5,15 +5,20 @@ version = "0.11.0"
authors = ["Fluence Labs"] authors = ["Fluence Labs"]
edition = "2018" edition = "2018"
license = "Apache-2.0" license = "Apache-2.0"
documentation = "https://docs.rs/avm-server"
repository = "https://github.com/fluencelabs/aquavm/tree/master/avm/server"
publish = true # this crate is used by the node
keywords = ["fluence", "air", "webassembly", "programming-language"]
categories = ["wasm"]
[lib] [lib]
name = "avm_server" name = "avm_server"
path = "src/lib.rs" path = "src/lib.rs"
[dependencies] [dependencies]
fluence-faas = "0.9.0"
air-interpreter-interface = { version = "0.7.0", path = "../../crates/air-lib/interpreter-interface" } air-interpreter-interface = { version = "0.7.0", path = "../../crates/air-lib/interpreter-interface" }
avm-data-store = { version = "0.1.0", path = "../../crates/data-store" } avm-data-store = { version = "0.1.0", path = "../../crates/data-store" }
fluence-faas = "0.9.2"
polyplets = { version = "0.1.2", path = "../../crates/air-lib/polyplets" } polyplets = { version = "0.1.2", path = "../../crates/air-lib/polyplets" }
eyre = "0.6.5" eyre = "0.6.5"

View File

@ -1,10 +1,13 @@
[package] [package]
name = "air-parser" name = "air-parser"
description = "Parser of the AIR scripts in a form of string to AST"
version = "0.7.1" version = "0.7.1"
authors = ["Fluence Labs"] authors = ["Fluence Labs"]
edition = "2018" edition = "2018"
license = "Apache-2.0" license = "Apache-2.0"
publish = false publish = false
keywords = ["fluence", "air", "parser", "lalrpop"]
categories = ["wasm"]
[build-dependencies] [build-dependencies]
lalrpop = "0.19.6" lalrpop = "0.19.6"

View File

@ -5,7 +5,7 @@ version = "0.2.0"
authors = ["Fluence Labs"] authors = ["Fluence Labs"]
edition = "2018" edition = "2018"
license = "Apache-2.0" license = "Apache-2.0"
repository = "https://github.com/fluencelabs/air" publish = false
keywords = ["fluence", "air", "webassembly", "programming-language"] keywords = ["fluence", "air", "webassembly", "programming-language"]
categories = ["wasm"] categories = ["wasm"]

View File

@ -6,7 +6,8 @@ authors = ["Fluence Labs"]
edition = "2018" edition = "2018"
license = "Apache-2.0" license = "Apache-2.0"
documentation = "https://docs.rs/air-interpreter-interface" documentation = "https://docs.rs/air-interpreter-interface"
repository = "https://github.com/fluencelabs/air" repository = "https://github.com/fluencelabs/aquavm/tree/master/crates/air-lib/interpreter-interface"
publish = true # this crate is used by avm server that in its turn is used by the node
keywords = ["fluence", "air", "webassembly", "programming-language"] keywords = ["fluence", "air", "webassembly", "programming-language"]
categories = ["wasm"] categories = ["wasm"]

View File

@ -5,7 +5,6 @@ description = "Definition of global consts used for logging"
authors = ["Fluence Labs"] authors = ["Fluence Labs"]
edition = "2018" edition = "2018"
license = "Apache-2.0" license = "Apache-2.0"
repository = "https://github.com/fluencelabs/air/crates/log-targets"
publish = false publish = false
keywords = ["fluence", "air", "webassembly", "programming-language"] keywords = ["fluence", "air", "webassembly", "programming-language"]
categories = ["wasm"] categories = ["wasm"]

View File

@ -1,12 +1,13 @@
[package] [package]
name = "polyplets" name = "polyplets"
version = "0.1.2" version = "0.1.2"
description = "Security primitives to verify origin of service calls in Fluence network"
authors = ["Fluence Labs"] authors = ["Fluence Labs"]
edition = "2018" edition = "2018"
license = "Apache-2.0" license = "Apache-2.0"
description = "Security primitives to verify origin of service calls in Fluence network"
documentation = "https://docs.rs/polyplets" documentation = "https://docs.rs/polyplets"
repository = "https://github.com/fluencelabs/crates/polyplets" repository = "https://github.com/fluencelabs/aquavm/tree/master/crates/air-lib/polyplets"
publish = true # this crate is used by the avm server that in its turn is used by the node
keywords = ["fluence", "air", "webassembly", "security", "authorization"] keywords = ["fluence", "air", "webassembly", "security", "authorization"]
categories = ["authentication"] categories = ["authentication"]

View File

@ -1,10 +1,13 @@
[package] [package]
name = "air-test-utils" name = "air-test-utils"
version = "0.2.1" version = "0.2.1"
description = "Test utils for the AIR interpreter"
authors = ["Fluence Labs"] authors = ["Fluence Labs"]
edition = "2018" edition = "2018"
license = "Apache-2.0" license = "Apache-2.0"
publish = false publish = false
keywords = ["fluence", "air", "webassembly", "security", "authorization"]
categories = ["wasm"]
[lib] [lib]
name = "air_test_utils" name = "air_test_utils"
@ -14,6 +17,6 @@ path = "src/lib.rs"
air = { path = "../../../air" } air = { path = "../../../air" }
air-interpreter-interface = { path = "../interpreter-interface" } air-interpreter-interface = { path = "../interpreter-interface" }
avm-server = { path = "../../../avm/server" } avm-server = { path = "../../../avm/server" }
marine-rs-sdk = "0.6.11" marine-rs-sdk = "0.6.13"
serde_json = "1.0.61" serde_json = "1.0.61"

View File

@ -5,7 +5,6 @@ description = "Implementation of AIR trace handler"
authors = ["Fluence Labs"] authors = ["Fluence Labs"]
edition = "2018" edition = "2018"
license = "Apache-2.0" license = "Apache-2.0"
repository = "https://github.com/fluencelabs/air/crates/trace-handler"
publish = false publish = false
keywords = ["fluence", "air", "webassembly", "programming-language"] keywords = ["fluence", "air", "webassembly", "programming-language"]
categories = ["wasm"] categories = ["wasm"]

View File

@ -1,10 +1,15 @@
[package] [package]
name = "avm-data-store" name = "avm-data-store"
description = "Definition of the AVM DataStore trait"
version = "0.1.0" version = "0.1.0"
description = "Definition of the AVM DataStore trait"
authors = ["Fluence Labs"] authors = ["Fluence Labs"]
edition = "2018" edition = "2018"
license = "Apache-2.0" license = "Apache-2.0"
documentation = "https://docs.rs/avm-data-store"
repository = "https://github.com/fluencelabs/aquavm/tree/master/crates/data-store"
publish = true # this crate is used by avm server that in its turn is used by the node
keywords = ["fluence", "air", "webassembly", "programming-language"]
categories = ["wasm"]
[lib] [lib]
name = "avm_data_store" name = "avm_data_store"

View File

@ -1,8 +1,8 @@
[package] [package]
name = "air-interpreter-wasm" name = "air-interpreter-wasm"
version = "0.1.0" version = "0.1.0"
authors = ["Fluence Labs"]
description = "Distribution of AIR interpreter as .wasm" description = "Distribution of AIR interpreter as .wasm"
authors = ["Fluence Labs"]
license = "Apache-2.0" license = "Apache-2.0"
edition = "2018" edition = "2018"
include = [ include = [
@ -10,6 +10,11 @@ include = [
"Cargo.toml", "Cargo.toml",
"air_interpreter_server.wasm" "air_interpreter_server.wasm"
] ]
documentation = "https://docs.rs/air-interpreter-wasm"
repository = "https://github.com/fluencelabs/aquavm/tree/master/crates/interpreter-wasm"
publish = true # this crate is used by the node
keywords = ["fluence", "air", "webassembly", "programming-language"]
categories = ["wasm"]
[build-dependencies] [build-dependencies]
built = "0.4.4" built = "0.4.4"

View File

@ -1,14 +0,0 @@
[package]
name = "air-test-module"
version = "0.1.0"
authors = ["Fluence Labs"]
edition = "2018"
license = "Apache-2.0"
publish = false
[[bin]]
name = "air_test_module"
path = "src/main.rs"
[dependencies]
marine-rs-sdk = { version = "0.6.11", features = ["logger"] }

View File

@ -1,55 +0,0 @@
/*
* Copyright 2020 Fluence Labs Limited
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#![warn(rust_2018_idioms)]
#![deny(
dead_code,
nonstandard_style,
unused_imports,
unused_mut,
unused_variables,
unused_unsafe,
unreachable_patterns
)]
use marine_rs_sdk::marine;
fn main() {}
#[marine]
#[derive(Debug, Default, Clone, PartialEq, Eq)]
pub struct CallServiceResult {
pub ret_code: i32,
pub result: String,
}
#[marine]
pub fn call_service(
service_id: String,
fn_name: String,
args: String,
tetraplets: String,
) -> CallServiceResult {
println!(
"call service invoked with:\n service_id: {}\n fn_name: {}\n args: {}\n tetraples: {}",
service_id, fn_name, args, tetraplets
);
CallServiceResult {
ret_code: 0,
result: String::from("[\"result string\"]"),
}
}