Skip to content

Commit

Permalink
fix docs
Browse files Browse the repository at this point in the history
  • Loading branch information
Mr-Leshiy committed Feb 9, 2024
1 parent aa551ed commit 6ef08e4
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 33 deletions.
4 changes: 1 addition & 3 deletions hermes/bin/src/runtime/extensions/bindings.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,7 @@
//!
//! *Note*
//! Inspect the generated code with:
//! ```
//! cargo expand --bin hermes runtime::extensions::bindings
//! ```
//! `cargo expand --bin hermes runtime::extensions::bindings`

#![allow(clippy::indexing_slicing)]

Expand Down
6 changes: 0 additions & 6 deletions hermes/bin/src/runtime/extensions/mod.rs
Original file line number Diff line number Diff line change
@@ -1,10 +1,4 @@
//! Hermes runtime extensions
//!
//! *Note*
//! Inspect the generated code with:
//! ```
//! cargo expand --bin hermes runtime::extensions
//! ```

use wasmtime::{
component::{Component, Linker},
Expand Down
13 changes: 0 additions & 13 deletions hermes/bin/src/runtime/host/wasi/io/streams.rs
Original file line number Diff line number Diff line change
Expand Up @@ -161,19 +161,6 @@ impl HostOutputStream for HermesState {
todo!()
}

/// *
/// /// Create a `pollable` which will resolve once the output-stream
/// /// is ready for more writing, or an error has occurred. When this
/// /// pollable is ready, `check-write` will return `ok(n)` with n>0, or an
/// /// error.
/// ///
/// /// If the stream is closed, this pollable is always ready immediately.
/// ///
/// /// The created `pollable` is a child resource of the `output-stream`.
/// /// Implementations may trap if the `output-stream` is dropped before
/// /// all derived `pollable`s created with this function are dropped.
/// subscribe: func() -> pollable;
/// */
/// Write zeroes to a stream.
///
/// this should be used precisely like `write` with the exact same
Expand Down
2 changes: 1 addition & 1 deletion hermes/bin/src/wasm/module.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@ use wasmtime::{
Store as WasmStore,
};

use super::engine::Engine;
use crate::{
event_queue::event::HermesEventPayload,
runtime::extensions::{
bindings,
state::{Context, Stateful},
},
state::HermesState,
wasm::engine::Engine,
};

/// Bad WASM module error
Expand Down
6 changes: 2 additions & 4 deletions wasm/wasi/wit/deps/http/types.wit
Original file line number Diff line number Diff line change
Expand Up @@ -438,7 +438,7 @@ interface types {
/// Returns a pollable which becomes ready when either the trailers have
/// been received, or an error has occured. When this pollable is ready,
/// the `get` method will return `some`.
//subscribe: func() -> pollable; // Hermes does NOT support `poll`
// subscribe: func() -> pollable; // Hermes does NOT support `poll`

/// Returns the contents of the trailers, or an error which occured,
/// once the future is ready.
Expand Down Expand Up @@ -547,12 +547,10 @@ interface types {
/// This resource is returned by the `wasi:http/outgoing-handler` interface to
/// provide the HTTP Response corresponding to the sent Request.
resource future-incoming-response {
/*
/// Returns a pollable which becomes ready when either the Response has
/// been received, or an error has occured. When this pollable is ready,
/// the `get` method will return `some`.
subscribe: func() -> pollable;
*/
// subscribe: func() -> pollable; // Hermes does NOT support `poll`

/// Returns the incoming HTTP Response, or an error, once one is ready.
///
Expand Down
8 changes: 2 additions & 6 deletions wasm/wasi/wit/deps/io/streams.wit
Original file line number Diff line number Diff line change
Expand Up @@ -83,15 +83,13 @@ interface streams {
len: u64,
) -> result<u64, stream-error>;

/*
/// Create a `pollable` which will resolve once either the specified stream
/// has bytes available to read or the other end of the stream has been
/// closed.
/// The created `pollable` is a child resource of the `input-stream`.
/// Implementations may trap if the `input-stream` is dropped before
/// all derived `pollable`s created with this function are dropped.
subscribe: func() -> pollable;
*/
// subscribe: func() -> pollable; // Hermes does NOT support `poll`
}


Expand Down Expand Up @@ -170,7 +168,6 @@ interface streams {
/// and stream is ready for writing again.
blocking-flush: func() -> result<_, stream-error>;

/*
/// Create a `pollable` which will resolve once the output-stream
/// is ready for more writing, or an error has occured. When this
/// pollable is ready, `check-write` will return `ok(n)` with n>0, or an
Expand All @@ -181,8 +178,7 @@ interface streams {
/// The created `pollable` is a child resource of the `output-stream`.
/// Implementations may trap if the `output-stream` is dropped before
/// all derived `pollable`s created with this function are dropped.
subscribe: func() -> pollable;
*/
// subscribe: func() -> pollable; // Hermes does NOT support `poll`

/// Write zeroes to a stream.
///
Expand Down

0 comments on commit 6ef08e4

Please sign in to comment.