-
Notifications
You must be signed in to change notification settings - Fork 258
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
refactor: replace syscall interactions in wasm32 environment #417
Conversation
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.
-200 lines look nice!
@@ -12,14 +12,10 @@ use syn::{File, ItemEnum, ItemImpl, ItemStruct, ItemTrait}; | |||
#[proc_macro_attribute] | |||
pub fn near_bindgen(_attr: TokenStream, item: TokenStream) -> TokenStream { | |||
if let Ok(input) = syn::parse::<ItemStruct>(item.clone()) { | |||
let sys_file = rust_file(include_str!("../res/sys.rs")); |
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.
🎉
Think we need to make the For now, I'll just make it public, but I'd love opinions on how this should be namespaced (within Edit: ignore the path references, because I didn't want to update to a pushed commit yet, but austinabell/ref-contracts@26ebf5b gives an idea of how the migration could go. Builds and tests pass using this branch. Does anyone have a good example of a contract that uses a lot of the sdk's internals? |
I put the This will absolutely be a breaking change but would be very good to get in if working towards having a stable contract upgradability pattern to use this updated interface. |
Oh dear, so we actually publicly exposed the whole edifice, with thread_local and such? I think the solution of exposing the naked The question is, what do we do with version numbers though?
|
Yeah, it was exposed, so this is definitely a breaking change. I have exposed it as
Yeah, this is definitely a good idea, how about we keep the interface under |
👍
I think we need to explicitly decide what we do with respect to version numbers & publishing. Thinking about this some more, the choices are:
|
To me it seems that the least controversial option is 2, burn yet another major version number. It has the fewest unknown unknowns. |
Yeah maybe option 2 is the best option, and I'm having a tough time making a point for another. I would really like to avoid keeping the Let's create a list of all things that should change for a major release and try to work to that ASAP (while limiting as many breaking changes), and can always decide to defer making these changes if the scoped out list is not suitable for external/internal parties. Maybe we can use #387 for coordination on this? |
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.
Thanks for the discussion in our meeting about this today. 👍🏼
feat: Initialize blockchain interface by default
wasm32
config (and might add more) which might be breaking if currently misused externallyDepends on #415 (not necessarily directly, but makes a lot of this a lot cleaner)
I tested with all examples and they all work, will go on to text external things now to check for breakages
Closes #373
Closes #416
Progress on #372