You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: improve state copying between host and WASM contracts
- Remove 3 unnecessary WrappedState .clone() calls in contract.rs;
write() only needs AsRef<[u8]>, no ownership transfer required
- Add init_buf_with_capacity() to allocate WASM buffers by size
without needing the data upfront
- Use bincode::serialize_into to write RelatedContracts and UpdateData
directly into WASM memory, eliminating intermediate Vec allocations
- Fix pre-existing clippy warnings in test code (wildcard_enum_match_arm,
assertions_on_constants)
Depends on freenet/freenet-stdlib#62 for the std::io::Write impl
on BufferMut.
0 commit comments