Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@joncinque
Copy link
Collaborator

Problem

We're about to publish a breaking change to system-interface, so why not have a little fun and make it no-std beforehand!

Summary of changes

Add alloc feature for vec / string and std feature for frozen-abi. There's not a ton you can do with the crate currently since the instructions require bincode / alloc, but we should be able to trim this more in the future with pinocchio-compatible types.

While testing this, I noticed that the frozen-abi tests didn't work for no-std crates, which will likely become a problem in the future, so I fixed the macro to properly emit eprintln rather than through the hacky way it's done now.

#### Problem

We're about to publish a breaking change to system-interface, so why not
have a little fun and make it no-std beforehand!

#### Summary of changes

Add alloc feature for vec / string and std feature for frozen-abi.
There's not a ton you can do with the crate currently since the
instructions require bincode / alloc, but we should be able to trim this
more in the future with pinocchio-compatible types.

While testing this, I noticed that the frozen-abi tests didn't work for
no-std crates, which will likely become a problem in the future, so I
fixed the macro to properly emit eprintln rather than through the hacky
way it's done now.
@joncinque joncinque requested a review from rustopian October 9, 2025 23:34
@joncinque joncinque added the breaking PR contains breaking changes label Oct 9, 2025
feature = "serde",
derive(serde_derive::Deserialize, serde_derive::Serialize)
)]
#[cfg(feature = "alloc")]
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This is the breaking change, since SystemInstruction isn't available without alloc enabled.

Copy link
Contributor

@rustopian rustopian left a comment

Choose a reason for hiding this comment

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

Looks good, but a possible suggestion on the eprintln!

Copy link
Contributor

@rustopian rustopian left a comment

Choose a reason for hiding this comment

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

Looks great 🎉

@joncinque joncinque merged commit 326c576 into anza-xyz:master Oct 10, 2025
27 checks passed
@joncinque joncinque deleted the sys-no-std branch October 10, 2025 20:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

breaking PR contains breaking changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants