diff --git a/.circleci/config.yml b/.circleci/config.yml index 927365e..e6ccab9 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -15,13 +15,17 @@ jobs: rustup toolchain install nightly-2021-02-27 rustup default nightly-2021-02-27 rustup override set nightly-2021-02-27 - rustup target add wasm32-unknown-unknown + rustup target add wasm32-wasi rustup component add rustfmt rustup component add clippy cargo fmt --all -- --check --color always - cargo build -v --target wasm32-unknown-unknown --all-features + + (cd fluence; cargo build -v --target wasm32-wasi --all-features) + (cd fluence; cargo clippy -v --target wasm32-wasi) + (cd fluence-test; cargo build) + cargo test -v --all-features - cargo clippy -v --target wasm32-unknown-unknown + - save_cache: paths: - ~/.cargo diff --git a/crates/fce-macro/src/lib.rs b/crates/fce-macro/src/lib.rs index 26442ed..658b1a5 100644 --- a/crates/fce-macro/src/lib.rs +++ b/crates/fce-macro/src/lib.rs @@ -23,7 +23,7 @@ //! # Examples //! //! This example shows how a function could be exported: -//! ``` +//! ```ignore //! #[fce] //! pub fn greeting(name: String) -> String { //! format!("Hi {}", name) @@ -33,7 +33,7 @@ //! This more complex example shows how a function could be imported from another Wasm module //! and how a struct could be passed: //! -//! ``` +//! ```ignore //! use fluence::MountedBinaryResult; //! //! #[fce] diff --git a/crates/fce-test-macro/src/lib.rs b/crates/fce-test-macro/src/lib.rs index 8b3b49d..5e0a373 100644 --- a/crates/fce-test-macro/src/lib.rs +++ b/crates/fce-test-macro/src/lib.rs @@ -34,7 +34,7 @@ use fce_test::fce_test_impl; use proc_macro::TokenStream; /// This macro allows user to write tests for services in the following form: -///```rust +///```ignore /// #[fce_test(config = "/path/to/Config.toml")] /// fn test() { /// let service_result = fce.call("greeting", "name"); @@ -43,7 +43,7 @@ use proc_macro::TokenStream; ///``` /// /// This function is desugrated in the following way: -///```rust +///```ignore /// #[test] /// fn test() { /// let fce = fluence_faas::FluenceFaaS::with_raw_config("/path/to/Config.toml") diff --git a/crates/wit/src/parsed_type/fn_epilog.rs b/crates/wit/src/parsed_type/fn_epilog.rs index a79a6fd..f332369 100644 --- a/crates/wit/src/parsed_type/fn_epilog.rs +++ b/crates/wit/src/parsed_type/fn_epilog.rs @@ -28,7 +28,7 @@ pub(crate) struct FnEpilogDescriptor { /// This trait could be used to generate various parts needed to construct epilog of an export /// function. They are marked with # in the following example: -/// ``` +/// ```ignore /// quote! { /// pub unsafe fn foo(...) #fn_return_type { /// ... diff --git a/crates/wit/src/parsed_type/fn_prolog.rs b/crates/wit/src/parsed_type/fn_prolog.rs index c5b2c8b..3135a05 100644 --- a/crates/wit/src/parsed_type/fn_prolog.rs +++ b/crates/wit/src/parsed_type/fn_prolog.rs @@ -31,7 +31,7 @@ pub(crate) struct FnPrologDescriptor { /// This trait could be used to generate various parts needed to construct prolog of an export /// function. They are marked with # in the following example: -/// ``` +/// ```ignore /// quote! { /// fn foo(#(#raw_arg_names: #raw_arg_types),*) { /// #prolog diff --git a/crates/wit/src/parsed_type/foreign_mod_prolog.rs b/crates/wit/src/parsed_type/foreign_mod_prolog.rs index 6de6947..0ccc5ff 100644 --- a/crates/wit/src/parsed_type/foreign_mod_prolog.rs +++ b/crates/wit/src/parsed_type/foreign_mod_prolog.rs @@ -33,7 +33,7 @@ pub(crate) struct ExternDescriptor { /// This trait could be used to generate various parts needed to construct prolog of an wrapper /// function or extern block. They are marked with # in the following examples: -/// ``` +/// ```ignore /// quote! { /// fn foo(#(#arg_names: #arg_types), *) { /// let arg_1 = std::mem::ManuallyDrop::new(arg_1); @@ -44,7 +44,7 @@ pub(crate) struct ExternDescriptor { /// } /// ``` /// -/// ``` +/// ```ignore /// quote! { /// extern "C" { /// #[link_name = "foo_link_name"]