-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Fixes WasmAllocator
to reflect recent nightly API changes
#214
Conversation
substrate/pwasm-alloc/src/lib.rs
Outdated
@@ -20,16 +20,16 @@ mod __impl { | |||
extern crate alloc; | |||
extern crate pwasm_libc; | |||
|
|||
use self::alloc::heap::{GlobalAlloc, Layout, Opaque}; | |||
use core::alloc::{GlobalAlloc, Layout}; |
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.
This line needs attention. Note, that I removed the leading self
. Don't sure, how WASM and no-std
stuff is linked, so it may be an issue.
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.
probably the extern crate alloc
and corresponding feature is no longer necessary since this stuff is in libcore
now
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.
also the feature global_allocator
is also no longer needed
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.
Yeah, forgot to push the second commit.
This is not the only allocator used in the project: |
extern crate pwasm_libc; | ||
|
||
use self::alloc::heap::{GlobalAlloc, Layout, Opaque}; | ||
use core::alloc::{GlobalAlloc, Layout}; |
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.
Do we actually need feature(alloc)
here?
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.
No, it successfully compiled without alloc
and allocator_api
.
could do with this getting sorted... is |
@gavofyork Compilation fails because Quick workaround is to update -wee_alloc = "0.4.0"
+wee_alloc = { git = "https://github.com/rustwasm/wee_alloc", branch = "master" } |
Nope, it isn't, but I'm sort of a reviewer. The fix is already on master, but it is not yet released on crates.io. I probably can release it, but I'd rather leave it for the main maintainer. |
ok lets put the workaround into #214 and merge that |
we can't have our CI pipeline halted waiting on an upstream project |
Revision 4e9f23f points to a master after rustwasm/wee_alloc#45 was merged
All tests passed. PR may be merged. |
* init * mv kill author to on initialize * rm unused const * bump version and address grumble with assert noop import
* Use bs58 instead of our own base58 * Rewrite serde_text and serde_hex Signed-off-by: koushiro <koushiro.cqx@gmail.com>
* glossary for farmer binary, and farming separated into its own documentation
* hacky integration with jsonrpsee v2 * stray todos * fmt * add http support * make test build compile * Update src/rpc.rs * bring back set_client * use crates.io version jsonrpsee * WIP: workaround for embedded subxt client (paritytech#236) * workaround for embedded subxt client Signed-off-by: Gregory Hill <gregorydhill@outlook.com> * increase default channel size on subxt client Signed-off-by: Gregory Hill <gregorydhill@outlook.com> * remove client tests due to inference problem on From Signed-off-by: Gregory Hill <gregorydhill@outlook.com> * add comments for missing impls * more verbose errors * make subscription notifs buffer bigger * fmt Co-authored-by: Greg Hill <gregorydhill@outlook.com>
No description provided.