system-interface: Make it no-std compatible #363
Merged
+18
−6
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.
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.