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

feat(allocator): add no_std support #9704

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

Conversation

CrazyboyQCD
Copy link

Add no_std support for oxc_allocator for downstream crates that need no_std.

Copy link

graphite-app bot commented Mar 12, 2025

How to use the Graphite Merge Queue

Add either label to this PR to merge it via the merge queue:

  • 0-merge - adds this PR to the back of the merge queue
  • hotfix - for urgent hot fixes, skip the queue and merge this PR next

You must have a Graphite account in order to use the merge queue. Sign up using this link.

An organization admin has enabled the Graphite Merge Queue in this repository.

Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue.

@github-actions github-actions bot added A-linter Area - Linter C-enhancement Category - New feature or request labels Mar 12, 2025
@overlookmotel
Copy link
Contributor

oxc_allocator crate is currently undergoing a lot of changes. We are in the process of replacing Vec with our own custom implementation (#9646 and later PRs). We also intend to replace bumpalo with our own allocator soon. So it's not an ideal time to be making this kind of change.

Out of interest, can you please outline what your use case is that requires no_std?

@overlookmotel overlookmotel removed the A-linter Area - Linter label Mar 12, 2025
@CrazyboyQCD
Copy link
Author

This pr could be postponed when refactor is done:)

Out of interest, can you please outline what your use case is that requires no_std?

Shader parser, which is needed to implement in some targets like wasm32v1-none

@CrazyboyQCD CrazyboyQCD marked this pull request as draft March 12, 2025 11:30
@Boshen
Copy link
Member

Boshen commented Mar 12, 2025

I'm hesitant to maintain no_std.

And I also couldn’t find any public repositories from you that rely on Oxc.

Please reach out / provide more context if this is for a company project.

@CrazyboyQCD
Copy link
Author

CrazyboyQCD commented Mar 13, 2025

I'm hesitant to maintain no_std.

I think oxc_allocator itself doesn't take much effort to be maintained as no_std (no multithread code now), and making it no_std will allow more users to use it.

And I also couldn’t find any public repositories from you that rely on Oxc.

Please reach out / provide more context if this is for a company project.

It is personal experimental project currently, may contribute to naga in wgpu in future.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-enhancement Category - New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants