-
Notifications
You must be signed in to change notification settings - Fork 444
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
regex-lite: make the std feature optional #1122
Comments
Yes... That was intentional. That way, it can be made optional in a semver compatible release. If it didn't have a I don't think I personally will work on this any time soon, but patches are welcome.
Note that |
I did get it to build alloc-only, but it wasn't particularly clean. Basically, I made Arc actually Rc, and remove the Send+Sync constraint on CachePoolFn, and instead of the Mutex in pool.rs, I make a fake one out of a RefCell. So, it does work, but ultimately, I think it is just going to be too big for this kind of environment. (the heap was using about half of my available RAM). It's amazing how small a few hundred KB of RAM seems these days. |
You shouldn't need to do anything with The pool is indeed probably the trickiest part. We'll probably need to introduce With that said, if you're really in that constrained of an environment, have you tried using |
I'm currently working on a project for a risc-v processor and I'm unable to build |
This is about |
@jorolf And also, |
And are you doing this on an embedded system? The |
Hmm nvm then. I was working on reusing parts of a library in a no-std environment but I didn't really check which dependencies are needed for my usecase. Maybe I can make it work some other way. Fwiw, there is a sub-crate called PS: I felt this issue was appropriate because |
Possibly, but your initial comment was talking about This section might help you: https://github.com/rust-lang/regex/blob/master/regex-cli/README.md#example-serialize-a-dfa It shows how to use a DFA regex in no-std/no-alloc core-only mode. |
regex-lite has std feature, but t doesn't compile
I was considering regex-lite in an embedded system. However, trying to compile with
std
not enable generates acompiler_error!("'std' is currently a required feature, please file an issue");
The text was updated successfully, but these errors were encountered: