Skip to content

updating wasmtime to 36.0.0#89

Merged
ruslanti merged 2 commits intomainfrom
update-wasmtime-36.0.0
Sep 17, 2025
Merged

updating wasmtime to 36.0.0#89
ruslanti merged 2 commits intomainfrom
update-wasmtime-36.0.0

Conversation

@ruslanti
Copy link
Collaborator

No description provided.

@ruslanti ruslanti requested a review from qrdl September 17, 2025 09:05
@ruslanti ruslanti self-assigned this Sep 17, 2025
@ruslanti ruslanti added the enhancement New feature or request label Sep 17, 2025
@ruslanti ruslanti requested a review from Copilot September 17, 2025 09:08
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR updates the wasmtime dependency from version 31.0.0 to 36.0.0, requiring significant changes to adapt to the new API. The update involves adjusting type constraints, import paths, and API method calls to maintain compatibility with the newer wasmtime version.

Key changes include:

  • Adding 'static lifetime constraints to generic type parameters throughout the codebase
  • Updating import paths for WASI modules and related functionality
  • Modifying API calls to use new method names and signatures introduced in wasmtime 36.0.0

Reviewed Changes

Copilot reviewed 12 out of 13 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
Cargo.toml Updates wasmtime dependencies from 31.0.0 to 36.0.0 and adds wasmtime-wasi-io
crates/runtime/src/store.rs Adds 'static lifetime bounds to Store struct and trait implementations
crates/runtime/src/service.rs Adds 'static lifetime bound to Service State associated type
crates/runtime/src/logger.rs Major refactor to use AsyncWrite instead of OutputStream, updates imports and method signatures
crates/runtime/src/lib.rs Updates WASI-related imports and adds 'static bounds to Data and engine structs
crates/runtime/Cargo.toml Adds tokio and wasmtime-wasi-io dependencies
crates/reactor/src/lib.rs Updates bindgen configuration syntax from async/tracing flags to imports syntax
crates/key-value-store/Cargo.toml Relaxes async-trait version constraint
crates/http-service/src/lib.rs Updates WASI linker calls and adds HasSelf type parameters
crates/http-service/src/executor/wasi_http.rs Adds 'static lifetime bound to executor struct
crates/http-service/src/executor/http.rs Updates method calls and error handling to use new async logger API
crates/http-backend/Cargo.toml Relaxes version constraints for several dependencies

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Comment on lines +49 to +51
if let Err(error) = Box::into_pin(self.async_stream())
.write_all(msg.as_bytes())
.await
Copy link

Copilot AI Sep 17, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The Box::into_pin() call creates unnecessary heap allocation for each write operation. Consider storing the pinned writer as a field in the Logger struct or using a different approach that avoids repeated boxing.

Copilot uses AI. Check for mistakes.
})?;

reactor::gcore::fastedge::http_client::add_to_linker(linker, |data| {
reactor::gcore::fastedge::http_client::add_to_linker::<_, HasSelf<_>>(linker, |data| {
Copy link

Copilot AI Sep 17, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[nitpick] The repeated use of HasSelf<_> type parameter suggests this could be extracted into a type alias or helper function to reduce duplication and improve maintainability.

Copilot uses AI. Check for mistakes.
})?;

reactor::gcore::fastedge::dictionary::add_to_linker(linker, |data| {
reactor::gcore::fastedge::dictionary::add_to_linker::<_, HasSelf<_>>(linker, |data| {
Copy link

Copilot AI Sep 17, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[nitpick] The repeated use of HasSelf<_> type parameter suggests this could be extracted into a type alias or helper function to reduce duplication and improve maintainability.

Copilot uses AI. Check for mistakes.
})?;

reactor::gcore::fastedge::secret::add_to_linker(linker, |data| &mut data.secret_store)?;
reactor::gcore::fastedge::secret::add_to_linker::<_, HasSelf<_>>(linker, |data| {
Copy link

Copilot AI Sep 17, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[nitpick] The repeated use of HasSelf<_> type parameter suggests this could be extracted into a type alias or helper function to reduce duplication and improve maintainability.

Copilot uses AI. Check for mistakes.
})?;

reactor::gcore::fastedge::key_value::add_to_linker(linker, |data| {
reactor::gcore::fastedge::key_value::add_to_linker::<_, HasSelf<_>>(linker, |data| {
Copy link

Copilot AI Sep 17, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[nitpick] The repeated use of HasSelf<_> type parameter suggests this could be extracted into a type alias or helper function to reduce duplication and improve maintainability.

Copilot uses AI. Check for mistakes.
@ruslanti ruslanti merged commit 7a6f8fe into main Sep 17, 2025
1 check passed
@ruslanti ruslanti deleted the update-wasmtime-36.0.0 branch September 17, 2025 12:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants