Skip to content
This repository was archived by the owner on Jul 24, 2024. It is now read-only.

Conversation

edsrzf
Copy link
Contributor

@edsrzf edsrzf commented Sep 11, 2022

This project requires nightly Rust due to use of if-let chaining (see rust-lang/rust#53667). It's a nice quality-of-life change that I'm also looking forward to using once it's stable, but I found that requiring nightly presented a small barrier to me when I tried to build and run this project.

The first commit of this PR runs rustfmt on the lexer source, since my editor did it automatically. I hope this is okay, but if there's another format I should use instead I'd be happy to make changes.

@ryangjchandler
Copy link
Contributor

Yeah I typically build things with nightly so I can have the latest and greatest but you're right that it prevents stable toolchain projects from using the library.

Out of curiosity, how are you looking to use Trunk?

@ryangjchandler ryangjchandler merged commit 43a50b1 into php-rust-tools:main Sep 11, 2022
@edsrzf edsrzf deleted the no-nightly branch September 11, 2022 19:29
@edsrzf
Copy link
Contributor Author

edsrzf commented Sep 11, 2022

I'd started hacking on a PHP parser in Rust this weekend and then ended up finding Trunk through a search, and it appears much more complete. My motivation for a PHP parser in Rust is that lately I've been using tools like Psalm and Rector on an old PHP code base. They're great tools, but quite slow on a larger code base.

So I'm mainly interested in the parser. The compiler looks like a pretty interesting experiment, but probably a little too ambitious for me at this stage.

I hope you don't mind if I poke around. It's mostly about doing something I find interesting and fun on the side, and it sounds like this project is similar for you. If my activity means that your project is starting to feel like work instead, let me know and I can stop or change approaches.

@ryangjchandler
Copy link
Contributor

You're absolutely welcome to use Trunk and help out where need be.

I actually started this project with the hope of building tooling too such as a static analyser and code formatter, so we're two people in the same boat. The slow performance of existing tools on huge projects is frustrating.

You should join the Discord - I've just got a bulk load of client work out the way so will be focusing on this again in the spare time, hoping to get it complete and usable on some real world projects.

Discord: https://discord.gg/49vgTdE6mb

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

2 participants