-
Notifications
You must be signed in to change notification settings - Fork 373
no_std
support for cosmwasm-std
#1483
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
Closed
Closed
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
82eca1c
feat(std): no_std
aeryz c101d5c
fix(std): add alloc imports to staking
aeryz ffcbbe5
Add std to cosmwasm-std in contracts
aeryz d83d3e9
Fix no_std dependencies
aeryz 8f53126
Fix all features for no_std
aeryz 2bffbf4
Fix CI for no_std
aeryz 4c6e24c
Fix CI and dependency resolver
aeryz c4ed906
Fix CHANGELOG.md
aeryz f19bf0f
Add `no_std` target to CI
aeryz 34af482
Upgrade `no_std` to 1.3
aeryz File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
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
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
#[cfg(feature = "std")] | ||
use { | ||
cosmwasm_schema::{export_schema, export_schema_with_title, remove_schemas, schema_for}, | ||
cosmwasm_std::{BlockInfo, CosmosMsg, Empty, QueryRequest, Timestamp}, | ||
std::env::current_dir, | ||
std::fs::create_dir_all, | ||
}; | ||
|
||
#[cfg(feature = "std")] | ||
fn main() { | ||
let mut out_dir = current_dir().unwrap(); | ||
out_dir.push("schema"); | ||
create_dir_all(&out_dir).unwrap(); | ||
remove_schemas(&out_dir).unwrap(); | ||
|
||
export_schema(&schema_for!(BlockInfo), &out_dir); | ||
export_schema(&schema_for!(Timestamp), &out_dir); | ||
export_schema_with_title(&schema_for!(CosmosMsg), &out_dir, "CosmosMsg"); | ||
export_schema_with_title(&schema_for!(QueryRequest<Empty>), &out_dir, "QueryRequest"); | ||
} | ||
|
||
#[cfg(not(feature = "std"))] | ||
fn main() {} |
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
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
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
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
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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see removing stuff from no_std build, but I think both
serde-json-wasm
is essential for it to work. Maybe a PR to make that no-std friendly (it was forked from serde-json-core which was no-std and we added stuff).Otherwise, how would a contract actually parse data? How would cw-storage-plus work?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thiserror is a bit sad to lose also, but I guess not absolutely needed here?
Not sure how StdError will interact with other types without it.