Skip to content

Conversation

@joshuamegnauth54
Copy link

freenet-core's minimum version is 1.80 while freenet-stdlib's version is 1.71. 1.71 was released three years ago. Bumping to 1.80 allows dropping once_cell in favor of using the standard lib.

I disabled the default features for chrono, futures, and semver because they weren't used. Chrono is only used in one place and the type is constructed through FFI rather than calling its functions. Futures is used for its traits so the rest of it isn't needed.

I removed serde_bytes in favor of serde_with. serde_with includes its own version of Bytes and serde_bytes was only used twice in the code.


Here is some extra info on the chrono changes to save you some time.

chrono::DateTime<Utc> is constructed in freenet-core/crates/core/src/wasm_runtime/native_api.rs. It's written directly to the contract's memory. The code for that, in freenet-stdlib, is here. This bypasses serde and the native system entirely, so the serde and std features aren't needed on chrono.

`freenet-core`'s minimum version is 1.80 while `freenet-stdlib`'s
version is 1.71. 1.71 was released three years ago. Bumping to 1.80
allows dropping `once_cell` in favor of using the standard lib.

I disabled the default features for `chrono`, `futures`, and `semver`
because they weren't used. Chrono is only used in one place and the type
is constructed through FFI rather than calling its functions. Futures is
used for its traits so the rest of it isn't needed.

I removed `serde_bytes` in favor of `serde_with`. `serde_with` includes
its own version of `Bytes` and `serde_bytes` was only used twice in the
code.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants