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(lib): make lib no_std #3395

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

Conversation

cathaysia
Copy link

@cathaysia cathaysia commented May 30, 2024

close #3391

lib/binding_rust/ffi.rs Show resolved Hide resolved
lib/binding_rust/lib.rs Outdated Show resolved Hide resolved
lib/binding_rust/lib.rs Show resolved Hide resolved
@ObserverOfTime
Copy link
Member

It seems that regex does support no_std, albeit with some performance loss.

@cathaysia
Copy link
Author

yes, I add regex to no_std. But as a trade-off, regex itself is removed from the workspace. Because default-features = false need to be set in the workspace. This will cause changes to other crates

@ObserverOfTime
Copy link
Member

ObserverOfTime commented May 31, 2024

There are more features that need to be toggled, and I also see this note now (though it could just be outdated), so maybe regex should just be disabled in no_std after all.

@cathaysia
Copy link
Author

that note is outdated. I test this pr for --target=thumbv7m-none-eabi, and this passed.

lib/Cargo.toml Show resolved Hide resolved
lib/Cargo.toml Outdated Show resolved Hide resolved
@ObserverOfTime
Copy link
Member

You should also add a note to the rust binding readme.

@ObserverOfTime ObserverOfTime added this to the 0.23 milestone Jun 1, 2024
@cathaysia cathaysia force-pushed the feature/no_std branch 2 times, most recently from 2d0b73c to 98dc0c2 Compare June 11, 2024 08:03
close tree-sitter#3391

Signed-off-by: DragonBillow <DragonBillow@outlook.com>

Update lib/Cargo.toml

Co-authored-by: ObserverOfTime <chronobserver@disroot.org>

Update lib/Cargo.toml

Co-authored-by: ObserverOfTime <chronobserver@disroot.org>
@cathaysia
Copy link
Author

this pr should ready be merged.

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.

Support nostd
2 participants