diff --git a/.github/workflows/publish_interpreter.yml b/.github/workflows/publish_interpreter.yml index e35e7880..decfbdb7 100644 --- a/.github/workflows/publish_interpreter.yml +++ b/.github/workflows/publish_interpreter.yml @@ -67,7 +67,7 @@ jobs: PAT="\\\\d+.\\\\d+.\\\\d+" 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" # get package name from Cargo.toml @@ -145,21 +145,21 @@ jobs: run: marine build --release -p air-interpreter --features marine working-directory: air-interpreter - - name: Copy air_interpreter_server.wasm to air-interpreter-wasm - run: cp target/wasm32-wasi/release/air_interpreter_server.wasm crates/air-interpreter-wasm/air_interpreter_server.wasm + - name: Copy air_interpreter_server.wasm to interpreter-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 }} run: | PATH="~/.cargo/bin:$PATH" 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 run: cargo login ${{ secrets.CRATES_IO_TOKEN }} - name: Publish to crates.io run: cargo publish --allow-dirty - working-directory: crates/air-interpreter-wasm + working-directory: crates/interpreter-wasm ### Create a pre-release - name: Create Release diff --git a/.github/workflows/publish_interpreter_dev.yml b/.github/workflows/publish_interpreter_dev.yml index 91485a75..5eb41bb6 100644 --- a/.github/workflows/publish_interpreter_dev.yml +++ b/.github/workflows/publish_interpreter_dev.yml @@ -72,7 +72,7 @@ jobs: PATH="$(yarn global bin):$PATH" 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" # 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 working-directory: air-interpreter - - name: Copy air_interpreter_server.wasm to air-interpreter-wasm - run: cp target/wasm32-wasi/release/air_interpreter_server.wasm crates/air-interpreter-wasm/air_interpreter_server.wasm + - name: Copy air_interpreter_server.wasm to interpreter-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 }} run: | @@ -178,11 +178,11 @@ jobs: NAME=$(toml get Cargo.toml package.name | jq -r .) 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 run: cargo login ${{ secrets.CRATES_IO_TOKEN }} - name: Publish to crates.io run: cargo publish --allow-dirty - working-directory: crates/air-interpreter-wasm + working-directory: crates/interpreter-wasm diff --git a/CHANGELOG.md b/CHANGELOG.md index 58e98535..f8221e7b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -74,23 +74,23 @@ and it's possible to address its fields separately: `%last_error%.$.instruction` ## 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 [] - empty results in call allowed and lead to forget a call result - Added a few benchmarks - - Fixed behaviour of the Xor instruction with inner Par instructions ([PR 19](https://github.com/fluencelabs/air/pull/19)) - - Iterator in the Fold becomes resolvable ([PR 23](https://github.com/fluencelabs/air/pull/23)) + - 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/aquavm/pull/23)) ## 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 - 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`) ## 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 - `par` becomes completed when at least one of its subtree is completed diff --git a/Cargo.lock b/Cargo.lock index eec0eca3..8c73442a 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -96,13 +96,6 @@ dependencies = [ "thiserror", ] -[[package]] -name = "air-test-module" -version = "0.1.0" -dependencies = [ - "marine-rs-sdk", -] - [[package]] name = "air-test-utils" version = "0.2.1" @@ -698,9 +691,9 @@ checksum = "37ab347416e802de484e4d03c7316c48f1ecb56574dfd4a46a80f173ce1de04d" [[package]] name = "fluence-app-service" -version = "0.9.0" +version = "0.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "58d92fd37b7673513efafb0d1e0c366b8d6f297b74e9bfcda27c452f400af70a" +checksum = "056981dd5707a42412774d0b95629898f21dbce129b99835ac3f59d39b4a5760" dependencies = [ "fluence-faas", "log", @@ -714,9 +707,9 @@ dependencies = [ [[package]] name = "fluence-faas" -version = "0.9.0" +version = "0.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87e91fe7deca2726f7bdca5ba59ecb68ab27282078fccf160fd4faefa9283f19" +checksum = "3fe120218635fd3055bdf3f7e4cf765e2e72866874818bd10f40e2abde882326" dependencies = [ "cmd_lib", "itertools 0.9.0", @@ -1048,9 +1041,9 @@ checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" [[package]] name = "leb128" -version = "0.2.4" +version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3576a87f2ba00f6f106fdfcd16db1d698d648a26ad8e0573cad8537c3c362d2a" +checksum = "884e2677b40cc8c339eaefcb701c32ef1fd2493d71118dc0ca4b6a736c93bd67" [[package]] name = "lexical-core" @@ -1106,9 +1099,9 @@ checksum = "3e2e65a1a2e43cfcb47a895c4c8b10d1f4a61097f9f254f183aee60cad9c651d" [[package]] name = "marine-it-generator" -version = "0.5.4" +version = "0.5.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7b40920a86fb49456f0e94862d56a8e0bfc22489e518d894628da0f3ade03d8" +checksum = "890b228b9151e9dff213501986f564445a2f9ca5a706088b5d900f5ecf67f7e7" dependencies = [ "cargo_toml", "it-lilo", @@ -1134,9 +1127,9 @@ dependencies = [ [[package]] name = "marine-it-parser" -version = "0.6.6" +version = "0.6.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4154fc98fcfeba65a45d774cff6eeb8bddc8aa66e897f46a74dc95e8823771ea" +checksum = "edd97bd85072fc540763769be153a7c8ee83391e668b37ef96d6c48decec2cd5" dependencies = [ "anyhow", "itertools 0.10.1", @@ -1176,9 +1169,9 @@ dependencies = [ [[package]] name = "marine-module-info-parser" -version = "0.2.0" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b4a0951d77c38171d8b2ddcc888d1153a2c4f777b3b7a7dca093a06c69b32d77" +checksum = "0ec8f4ab2eeeb5c1d66d9b56fe6b0b5bf39820aa8cc2f1d7be42bdf95654d529" dependencies = [ "anyhow", "chrono", @@ -1192,9 +1185,9 @@ dependencies = [ [[package]] name = "marine-module-interface" -version = "0.1.5" +version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "035fb5d160a50cbcbe244a343081550f689ceba945d95281bbe207d98bf25586" +checksum = "06bc36ef268bf7436916f1fa9b0c84104692a717ea5eef3c90b9f25c3407f6b7" dependencies = [ "anyhow", "itertools 0.10.1", @@ -1233,9 +1226,9 @@ dependencies = [ [[package]] name = "marine-runtime" -version = "0.7.0" +version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b27b0f7162a3a1ee314fc3ed46b424b2dd988849bdc17085dbacacfb820bc3be" +checksum = "983262d394c59d4321b141e303eb55015bc412f319d54bbad7f253e4583253b2" dependencies = [ "anyhow", "boolinator", @@ -1584,9 +1577,9 @@ checksum = "a1d01941d82fa2ab50be1e79e6714289dd7cde78eba4c074bc5a4374f650dfe0" [[package]] name = "quote" -version = "1.0.9" +version = "1.0.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3d0b9745dc2debf507c8422de05d7226cc1f0644216dfdfead988f9b1ab32a7" +checksum = "38bc8cc6a5f2e3655e0899c1b848643b2562f853f114bfec7be120678e3ace05" dependencies = [ "proc-macro2", ] @@ -1770,9 +1763,9 @@ dependencies = [ [[package]] name = "serde" -version = "1.0.118" +version = "1.0.130" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "06c64263859d87aa2eb554587e2d23183398d617427327cf2b3d0ed8c69e4800" +checksum = "f12d06de37cf59146fbdecab66aa99f9fe4f78722e3607577a5375d66bd0c913" dependencies = [ "serde_derive", ] @@ -1808,9 +1801,9 @@ dependencies = [ [[package]] name = "serde_derive" -version = "1.0.118" +version = "1.0.130" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c84d3526699cd55261af4b941e4e725444df67aa4f9e6a3564f18030d12672df" +checksum = "d7bc1a1ab1961464eae040d96713baa5a724a8152c1222492465b54322ec508b" dependencies = [ "proc-macro2", "quote", diff --git a/Cargo.toml b/Cargo.toml index 943f07b9..d9c945f8 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -11,13 +11,12 @@ members = [ "crates/air-lib/test-utils", "crates/air-lib/trace-handler", "crates/data-store", - "crates/test-module", ] exclude = [ "air/tests/test_module/integration/security_tetraplets/auth_module", "air/tests/test_module/integration/security_tetraplets/log_storage", - "crates/air-interpreter-wasm", + "crates/interpreter-wasm", ] [profile.release] diff --git a/air-interpreter/Cargo.toml b/air-interpreter/Cargo.toml index 35b289da..3be9559e 100644 --- a/air-interpreter/Cargo.toml +++ b/air-interpreter/Cargo.toml @@ -1,9 +1,12 @@ [package] name = "air-interpreter" version = "0.15.0" +description = "Crate-wrapper for air" authors = ["Fluence Labs"] edition = "2018" publish = false +keywords = ["fluence", "air", "webassembly", "programming-language"] +categories = ["wasm"] [lib] name = "air_interpreter_client" diff --git a/air/Cargo.toml b/air/Cargo.toml index 234f1429..4c52f265 100644 --- a/air/Cargo.toml +++ b/air/Cargo.toml @@ -1,9 +1,12 @@ [package] name = "air" version = "0.15.0" +description = "Implementation of the AIR interpreter" authors = ["Fluence Labs"] edition = "2018" publish = false +keywords = ["fluence", "air", "webassembly", "programming-language"] +categories = ["wasm"] [lib] name = "air" @@ -35,7 +38,7 @@ wasm-bindgen = "=0.2.65" [dev_dependencies] 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" csv = "1.1.5" diff --git a/avm/server/Cargo.toml b/avm/server/Cargo.toml index 9e952944..85ae3a9e 100644 --- a/avm/server/Cargo.toml +++ b/avm/server/Cargo.toml @@ -5,15 +5,20 @@ version = "0.11.0" authors = ["Fluence Labs"] edition = "2018" 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] name = "avm_server" path = "src/lib.rs" [dependencies] -fluence-faas = "0.9.0" air-interpreter-interface = { version = "0.7.0", path = "../../crates/air-lib/interpreter-interface" } 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" } eyre = "0.6.5" diff --git a/crates/air-lib/air-parser/Cargo.toml b/crates/air-lib/air-parser/Cargo.toml index 7a394383..8fbaaf75 100644 --- a/crates/air-lib/air-parser/Cargo.toml +++ b/crates/air-lib/air-parser/Cargo.toml @@ -1,10 +1,13 @@ [package] name = "air-parser" +description = "Parser of the AIR scripts in a form of string to AST" version = "0.7.1" authors = ["Fluence Labs"] edition = "2018" license = "Apache-2.0" publish = false +keywords = ["fluence", "air", "parser", "lalrpop"] +categories = ["wasm"] [build-dependencies] lalrpop = "0.19.6" diff --git a/crates/air-lib/interpreter-data/Cargo.toml b/crates/air-lib/interpreter-data/Cargo.toml index 5c4b2798..858260d7 100644 --- a/crates/air-lib/interpreter-data/Cargo.toml +++ b/crates/air-lib/interpreter-data/Cargo.toml @@ -5,7 +5,7 @@ version = "0.2.0" authors = ["Fluence Labs"] edition = "2018" license = "Apache-2.0" -repository = "https://github.com/fluencelabs/air" +publish = false keywords = ["fluence", "air", "webassembly", "programming-language"] categories = ["wasm"] diff --git a/crates/air-lib/interpreter-interface/Cargo.toml b/crates/air-lib/interpreter-interface/Cargo.toml index e035dc98..1a61b8f3 100644 --- a/crates/air-lib/interpreter-interface/Cargo.toml +++ b/crates/air-lib/interpreter-interface/Cargo.toml @@ -6,7 +6,8 @@ authors = ["Fluence Labs"] edition = "2018" license = "Apache-2.0" 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"] categories = ["wasm"] diff --git a/crates/air-lib/log-targets/Cargo.toml b/crates/air-lib/log-targets/Cargo.toml index 91220285..f1d7aed3 100644 --- a/crates/air-lib/log-targets/Cargo.toml +++ b/crates/air-lib/log-targets/Cargo.toml @@ -5,7 +5,6 @@ description = "Definition of global consts used for logging" authors = ["Fluence Labs"] edition = "2018" license = "Apache-2.0" -repository = "https://github.com/fluencelabs/air/crates/log-targets" publish = false keywords = ["fluence", "air", "webassembly", "programming-language"] categories = ["wasm"] diff --git a/crates/air-lib/polyplets/Cargo.toml b/crates/air-lib/polyplets/Cargo.toml index 0196d174..47d781e1 100644 --- a/crates/air-lib/polyplets/Cargo.toml +++ b/crates/air-lib/polyplets/Cargo.toml @@ -1,12 +1,13 @@ [package] name = "polyplets" version = "0.1.2" +description = "Security primitives to verify origin of service calls in Fluence network" authors = ["Fluence Labs"] edition = "2018" license = "Apache-2.0" -description = "Security primitives to verify origin of service calls in Fluence network" 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"] categories = ["authentication"] diff --git a/crates/air-lib/test-utils/Cargo.toml b/crates/air-lib/test-utils/Cargo.toml index b322842a..3d32631c 100644 --- a/crates/air-lib/test-utils/Cargo.toml +++ b/crates/air-lib/test-utils/Cargo.toml @@ -1,10 +1,13 @@ [package] name = "air-test-utils" version = "0.2.1" +description = "Test utils for the AIR interpreter" authors = ["Fluence Labs"] edition = "2018" license = "Apache-2.0" publish = false +keywords = ["fluence", "air", "webassembly", "security", "authorization"] +categories = ["wasm"] [lib] name = "air_test_utils" @@ -14,6 +17,6 @@ path = "src/lib.rs" air = { path = "../../../air" } air-interpreter-interface = { path = "../interpreter-interface" } avm-server = { path = "../../../avm/server" } -marine-rs-sdk = "0.6.11" +marine-rs-sdk = "0.6.13" serde_json = "1.0.61" diff --git a/crates/air-lib/trace-handler/Cargo.toml b/crates/air-lib/trace-handler/Cargo.toml index 79ec09ad..994740f3 100644 --- a/crates/air-lib/trace-handler/Cargo.toml +++ b/crates/air-lib/trace-handler/Cargo.toml @@ -5,7 +5,6 @@ description = "Implementation of AIR trace handler" authors = ["Fluence Labs"] edition = "2018" license = "Apache-2.0" -repository = "https://github.com/fluencelabs/air/crates/trace-handler" publish = false keywords = ["fluence", "air", "webassembly", "programming-language"] categories = ["wasm"] diff --git a/crates/data-store/Cargo.toml b/crates/data-store/Cargo.toml index 6189da83..8a79c688 100644 --- a/crates/data-store/Cargo.toml +++ b/crates/data-store/Cargo.toml @@ -1,10 +1,15 @@ [package] name = "avm-data-store" -description = "Definition of the AVM DataStore trait" version = "0.1.0" +description = "Definition of the AVM DataStore trait" authors = ["Fluence Labs"] edition = "2018" 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] name = "avm_data_store" diff --git a/crates/air-interpreter-wasm/Cargo.lock b/crates/interpreter-wasm/Cargo.lock similarity index 100% rename from crates/air-interpreter-wasm/Cargo.lock rename to crates/interpreter-wasm/Cargo.lock diff --git a/crates/air-interpreter-wasm/Cargo.toml b/crates/interpreter-wasm/Cargo.toml similarity index 51% rename from crates/air-interpreter-wasm/Cargo.toml rename to crates/interpreter-wasm/Cargo.toml index faa1e017..26c4c489 100644 --- a/crates/air-interpreter-wasm/Cargo.toml +++ b/crates/interpreter-wasm/Cargo.toml @@ -1,8 +1,8 @@ [package] name = "air-interpreter-wasm" version = "0.1.0" -authors = ["Fluence Labs"] description = "Distribution of AIR interpreter as .wasm" +authors = ["Fluence Labs"] license = "Apache-2.0" edition = "2018" include = [ @@ -10,6 +10,11 @@ include = [ "Cargo.toml", "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] built = "0.4.4" diff --git a/crates/air-interpreter-wasm/build.rs b/crates/interpreter-wasm/build.rs similarity index 100% rename from crates/air-interpreter-wasm/build.rs rename to crates/interpreter-wasm/build.rs diff --git a/crates/air-interpreter-wasm/src/lib.rs b/crates/interpreter-wasm/src/lib.rs similarity index 100% rename from crates/air-interpreter-wasm/src/lib.rs rename to crates/interpreter-wasm/src/lib.rs diff --git a/crates/test-module/Cargo.toml b/crates/test-module/Cargo.toml deleted file mode 100644 index 6c96c084..00000000 --- a/crates/test-module/Cargo.toml +++ /dev/null @@ -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"] } diff --git a/crates/test-module/src/main.rs b/crates/test-module/src/main.rs deleted file mode 100644 index 954495f0..00000000 --- a/crates/test-module/src/main.rs +++ /dev/null @@ -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\"]"), - } -}