Merged
Conversation
There was a problem hiding this comment.
Pull Request Overview
This pull request refactors the codebase to support external library usage by introducing a new runtime feature and modularizing initialization code. The changes consolidate feature-specific initialization logic into separate functions and update build configurations to ensure consistent runtime environments across all builds.
- Introduces a new
runtimefeature that consolidates all initialization logic under feature-gated functions - Refactors the build matrix to include the
runtimefeature for all builds and removes the "standard" build variant - Extends crate types to include
rlibfor better library compatibility
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| src/lib.rs | Refactored initialization logic into separate feature-gated functions and added runtime feature guard |
| Cargo.toml | Added runtime feature to default features and included rlib crate type for library usage |
| .github/workflows/release.yml | Updated build matrix to include runtime feature for all builds and simplified artifact naming |
Contributor
|
I saw some issue reported by Copilot |
Contributor
Author
false positives; copilot does not have full context - have commented. |
Joinhack
approved these changes
Aug 5, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This PR introduces changes so that the modules independent and hence importable into external runtimes - as library functions.
AI Description
This pull request introduces significant changes to streamline the runtime initialization process, update build configurations, and enhance modularity.
The most important updates include consolidating feature-specific initialization under a unified runtime feature, modifying build matrix configurations, and extending crate types for better compatibility.
Build configuration updates:
.github/workflows/release.ymlto include theruntimefeature alongside other features likecrypto,fetch,llm, andwasip1. This ensures a consistent runtime environment for all builds. ([.github/workflows/release.ymlL16-R19](https://github.com/blessnetwork/javy-bless-plugins/pull/18/files#diff-87db21a973eed4fef5f32b267aa60fcee5cbdf03c67fafdc2a9b553bb0b15f34L16-R19)).github/workflows/release.ymlby removing the special case for the "standard" build. ([.github/workflows/release.ymlL49-R48](https://github.com/blessnetwork/javy-bless-plugins/pull/18/files#diff-87db21a973eed4fef5f32b267aa60fcee5cbdf03c67fafdc2a9b553bb0b15f34L49-R48))Runtime initialization improvements:
crypto,fetch,llm,wasip1) under a newruntimefeature insrc/lib.rs. Each feature now has its ownset_*_globalsfunction to encapsulate initialization logic. ([[1]](https://github.com/blessnetwork/javy-bless-plugins/pull/18/files#diff-b1a35a68f14e696205874893c07fd24fdb88882b47c23cc0e0c80a30c7d53759R1-R6),[[2]](https://github.com/blessnetwork/javy-bless-plugins/pull/18/files#diff-b1a35a68f14e696205874893c07fd24fdb88882b47c23cc0e0c80a30c7d53759L20-R88),[[3]](https://github.com/blessnetwork/javy-bless-plugins/pull/18/files#diff-b1a35a68f14e696205874893c07fd24fdb88882b47c23cc0e0c80a30c7d53759L79-R98),[[4]](https://github.com/blessnetwork/javy-bless-plugins/pull/18/files#diff-b1a35a68f14e696205874893c07fd24fdb88882b47c23cc0e0c80a30c7d53759R114-R139))crypto.js,fetch.js,wasi/preview_1.js) during runtime initialization. ([src/lib.rsR114-R139](https://github.com/blessnetwork/javy-bless-plugins/pull/18/files#diff-b1a35a68f14e696205874893c07fd24fdb88882b47c23cc0e0c80a30c7d53759R114-R139))Crate configuration updates:
crate-typeinCargo.tomlto includerlibalongsidecdylib, allowing for more flexible use cases. ([Cargo.tomlL14-R14](https://github.com/blessnetwork/javy-bless-plugins/pull/18/files#diff-2e9d962a08321605940b5a657135052fbcef87b5e360662bb527c96d9a615542L14-R14))runtimefeature inCargo.tomland added it to the default feature set. This ensures that runtime-related functionality is always included by default. ([Cargo.tomlL30-R31](https://github.com/blessnetwork/javy-bless-plugins/pull/18/files#diff-2e9d962a08321605940b5a657135052fbcef87b5e360662bb527c96d9a615542L30-R31))