Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix wasm target: wasm32-wasi is now wasm32-wasip1 #245

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/rust_tests.yml
Original file line number Diff line number Diff line change
@@ -100,14 +100,14 @@ jobs:
args: --target wasm32-unknown-unknown --features reqwest
- uses: actions-rs/cargo@v1
name: "Build"
if: matrix.target == 'wasm32-wasi'
if: matrix.target == 'wasm32-wasip1'
with:
command: build
toolchain: ${{ matrix.toolchain }}
args: --target ${{ matrix.target }} --features "http-0-2-binding hyper-0-14 hyper_wasi"
- uses: actions-rs/cargo@v1
name: "Test"
if: matrix.target == 'wasm32-wasi'
if: matrix.target == 'wasm32-wasip1'
with:
command: test
toolchain: ${{ matrix.toolchain }}
@@ -117,7 +117,7 @@ jobs:
# Build examples
- uses: actions-rs/cargo@v1
name: "Build wasi-example"
if: matrix.target == 'wasm32-wasi' && matrix.toolchain == 'stable'
if: matrix.target == 'wasm32-wasip1' && matrix.toolchain == 'stable'
with:
command: build
toolchain: ${{ matrix.toolchain }}
2 changes: 1 addition & 1 deletion example-projects/wasi-example/README.md
Original file line number Diff line number Diff line change
@@ -4,7 +4,7 @@ https://wasmedge.org/docs/start/install/

To run the server:
```console
cargo run --target wasm32-wasi
cargo run --target wasm32-wasip1
```

To test a GET:

Unchanged files with check annotations Beta

AttributeValue::Boolean(b) => f.serialize_bool(**b),
AttributeValue::Integer(i) => f.serialize_i64(**i),
AttributeValue::String(s) => f.write_str(s),
AttributeValue::Binary(b) => f.write_str(&base64::encode(b)),

Check warning on line 40 in src/event/attributes.rs

GitHub Actions / nightly / wasm32-unknown-unknown

use of deprecated function `base64::encode`: Use Engine::encode

Check warning on line 40 in src/event/attributes.rs

GitHub Actions / nightly / x86_64-unknown-linux-gnu

use of deprecated function `base64::encode`: Use Engine::encode

Check warning on line 40 in src/event/attributes.rs

GitHub Actions / nightly / x86_64-unknown-linux-gnu

use of deprecated function `base64::encode`: Use Engine::encode

Check warning on line 40 in src/event/attributes.rs

GitHub Actions / nightly / x86_64-unknown-linux-musl

use of deprecated function `base64::encode`: Use Engine::encode

Check warning on line 40 in src/event/attributes.rs

GitHub Actions / nightly / x86_64-unknown-linux-musl

use of deprecated function `base64::encode`: Use Engine::encode

Check warning on line 40 in src/event/attributes.rs

GitHub Actions / nightly / wasm32-wasip1

use of deprecated function `base64::encode`: Use Engine::encode

Check warning on line 40 in src/event/attributes.rs

GitHub Actions / nightly / wasm32-wasip1

use of deprecated function `base64::encode`: Use Engine::encode

Check warning on line 40 in src/event/attributes.rs

GitHub Actions / Rust

use of deprecated function `base64::encode`: Use Engine::encode

Check warning on line 40 in src/event/attributes.rs

GitHub Actions / stable / wasm32-wasip1

use of deprecated function `base64::encode`: Use Engine::encode

Check warning on line 40 in src/event/attributes.rs

GitHub Actions / stable / wasm32-wasip1

use of deprecated function `base64::encode`: Use Engine::encode

Check warning on line 40 in src/event/attributes.rs

GitHub Actions / stable / x86_64-unknown-linux-musl

use of deprecated function `base64::encode`: Use Engine::encode

Check warning on line 40 in src/event/attributes.rs

GitHub Actions / stable / x86_64-unknown-linux-musl

use of deprecated function `base64::encode`: Use Engine::encode

Check warning on line 40 in src/event/attributes.rs

GitHub Actions / stable / x86_64-unknown-linux-gnu

use of deprecated function `base64::encode`: Use Engine::encode

Check warning on line 40 in src/event/attributes.rs

GitHub Actions / stable / x86_64-unknown-linux-gnu

use of deprecated function `base64::encode`: Use Engine::encode

Check warning on line 40 in src/event/attributes.rs

GitHub Actions / stable / x86_64-unknown-linux-gnu

use of deprecated function `base64::encode`: Use Engine::encode

Check warning on line 40 in src/event/attributes.rs

GitHub Actions / stable / x86_64-unknown-linux-gnu

use of deprecated function `base64::encode`: Use Engine::encode

Check warning on line 40 in src/event/attributes.rs

GitHub Actions / stable / x86_64-unknown-linux-gnu

use of deprecated function `base64::encode`: Use Engine::encode

Check warning on line 40 in src/event/attributes.rs

GitHub Actions / stable / x86_64-unknown-linux-gnu

use of deprecated function `base64::encode`: Use Engine::encode

Check warning on line 40 in src/event/attributes.rs

GitHub Actions / stable / x86_64-unknown-linux-gnu

use of deprecated function `base64::encode`: Use Engine::encode

Check warning on line 40 in src/event/attributes.rs

GitHub Actions / stable / x86_64-unknown-linux-gnu

use of deprecated function `base64::encode`: Use Engine::encode
AttributeValue::URI(s) => f.write_str(s.as_str()),
AttributeValue::URIRef(s) => f.write_str(s.as_str()),
AttributeValue::Time(s) => f.write_str(&s.to_rfc3339()),
}
}
pub(crate) static CLOUDEVENTS_JSON_HEADER: &str = "application/cloudevents+json";

Check warning on line 58 in src/binding/mod.rs

GitHub Actions / stable / x86_64-unknown-linux-gnu

static `CLOUDEVENTS_JSON_HEADER` is never used
pub(crate) static CLOUDEVENTS_BATCH_JSON_HEADER: &str = "application/cloudevents-batch+json";

Check warning on line 59 in src/binding/mod.rs

GitHub Actions / nightly / wasm32-wasip1

static `CLOUDEVENTS_BATCH_JSON_HEADER` is never used

Check warning on line 59 in src/binding/mod.rs

GitHub Actions / nightly / wasm32-wasip1

static `CLOUDEVENTS_BATCH_JSON_HEADER` is never used

Check warning on line 59 in src/binding/mod.rs

GitHub Actions / stable / wasm32-wasip1

static `CLOUDEVENTS_BATCH_JSON_HEADER` is never used

Check warning on line 59 in src/binding/mod.rs

GitHub Actions / stable / wasm32-wasip1

static `CLOUDEVENTS_BATCH_JSON_HEADER` is never used

Check warning on line 59 in src/binding/mod.rs

GitHub Actions / stable / x86_64-unknown-linux-gnu

static `CLOUDEVENTS_BATCH_JSON_HEADER` is never used

Check warning on line 59 in src/binding/mod.rs

GitHub Actions / stable / x86_64-unknown-linux-gnu

static `CLOUDEVENTS_BATCH_JSON_HEADER` is never used

Check warning on line 59 in src/binding/mod.rs

GitHub Actions / stable / x86_64-unknown-linux-gnu

static `CLOUDEVENTS_BATCH_JSON_HEADER` is never used

Check warning on line 59 in src/binding/mod.rs

GitHub Actions / stable / x86_64-unknown-linux-gnu

static `CLOUDEVENTS_BATCH_JSON_HEADER` is never used

Check warning on line 59 in src/binding/mod.rs

GitHub Actions / stable / x86_64-unknown-linux-gnu

static `CLOUDEVENTS_BATCH_JSON_HEADER` is never used

Check warning on line 59 in src/binding/mod.rs

GitHub Actions / stable / x86_64-unknown-linux-gnu

static `CLOUDEVENTS_BATCH_JSON_HEADER` is never used
pub(crate) static CONTENT_TYPE: &str = "content-type";

Check warning on line 60 in src/binding/mod.rs

GitHub Actions / stable / x86_64-unknown-linux-gnu

static `CONTENT_TYPE` is never used
fn header_prefix(prefix: &str, name: &str) -> String {

Check warning on line 62 in src/binding/mod.rs

GitHub Actions / stable / x86_64-unknown-linux-gnu

function `header_prefix` is never used
if name == "datacontenttype" {
CONTENT_TYPE.to_string()
} else {
//! only the module associated with the Protocol Binding you need:
//!
//! - `actix`: Enables the [`binding::actix`] protocol binding module. This
//! extends the [`actix_web::HttpRequest`] with a

Check warning on line 40 in src/lib.rs

GitHub Actions / Rust

doc list item without indentation
//! [`to_event`](binding::actix::HttpRequestExt::to_event) function, the

Check warning on line 41 in src/lib.rs

GitHub Actions / Rust

doc list item without indentation
//! [`actix_web::HttpResponseBuilder`] with an

Check warning on line 42 in src/lib.rs

GitHub Actions / Rust

doc list item without indentation
//! [`event`](binding::actix::HttpResponseBuilderExt::event) function,

Check warning on line 43 in src/lib.rs

GitHub Actions / Rust

doc list item without indentation
//! and implementations for [`actix_web::FromRequest`] and

Check warning on line 44 in src/lib.rs

GitHub Actions / Rust

doc list item without indentation
//! [`actix_web::Responder`] in order to take advantage of actix-web's

Check warning on line 45 in src/lib.rs

GitHub Actions / Rust

doc list item without indentation
//! [Extractors] and [Responders]

Check warning on line 46 in src/lib.rs

GitHub Actions / Rust

doc list item without indentation
//! - `reqwest`: Enables the [`binding::reqwest`] protocol binding module.
//! - `warp`: Enables the [`binding::warp`] protocol binding module.
//! - `axum`: Enables the [`binding::axum`] protocol binding module.