Skip to content
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

Add nightly feature flag for Alloc -> AllocRef changes #12

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

KronicDeth
Copy link

Technically there was another breaking change in AllocRef later, so idk if calling the feature nightly is best or if using rustc-version cfg would be better, but if anyone else finds this useful, this works for our rustup default nightly-2020-03-10 based-builds.

Changelog

Enhancement

  • Add nightly feature for nightly-2020-03-10 compatibility. Changes uses of Alloc to AllocRef with accompanying function signatures.

Changes uses of Alloc to AllocRef with accompanying function signatures.
@alexcrichton
Copy link
Owner

I unfortunately don't have a ton of time to follow the changes upstream, so given the instability of the API my preference would likely be to remove the nightly support rather than trying to keep up with it I think?

@KronicDeth
Copy link
Author

We’re using nightly for WASM support and we’re also using dlmallloc for WASM support. Would that mean we would lose WASM support?

@alexcrichton
Copy link
Owner

Do you mean the Rust standard library or something external? This feature doesn't affect Rust's usage of dlmalloc for the wasm target, nor external wasm users using the dlmalloc crate for a global allocator. This is specifically for a nightly feature which you have to opt-in to with unstable APIs, which rarely happens I believe right now.

@KronicDeth
Copy link
Author

Hmm... Ok, my development notes are probably just wrong then.

We are likely using the allocator-api because dlmalloc is supplying the low-level "sys_alloc" that we build the GC allocator on top of in Lumen (Erlang in the browser and other AOT targets)

@TimDiekmann
Copy link
Contributor

As I am the only contributer from the allocator wg, I could update this crate as well if this is really needed. There is a major overhaul of AllocRef in the queue, so before putting to much effort into this, the linked PR should have landed.

@alexcrichton
Copy link
Owner

There isn't a great need for this for Rust's libstd, but I"m not familiar with @KronicDeth's Lumen use case, which may need it.

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.

3 participants