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

V3 Release #347

Merged
merged 76 commits into from
Dec 30, 2022
Merged

V3 Release #347

merged 76 commits into from
Dec 30, 2022

Conversation

gjtorikian
Copy link
Owner

@gjtorikian gjtorikian commented Jan 8, 2021

Mostly, this will modernize the gem by dropping old Ruby and Rails implementations. I'm also planning to user kwargs across the filters and methods.

If you're reading this and looking forward to adding a new breaking change, please open an issue to discuss.

Merged PRs for a future changelog:

@digitalmoksha
Copy link
Contributor

Can you upstream this to here? AssetProxyFilter looks much nicer.

Yeah you bet!

@gjtorikian gjtorikian merged commit 238fc88 into main Dec 30, 2022
@gjtorikian gjtorikian deleted the v3 branch December 30, 2022 14:49
gjtorikian added a commit that referenced this pull request Jan 26, 2023
@gjtorikian
Copy link
Owner Author

Can you upstream this to here? AssetProxyFilter looks much nicer.

Yeah you bet!

Hey, any interest in upstreaming?

@digitalmoksha
Copy link
Contributor

digitalmoksha commented May 18, 2023

Yeah of course, sorry I spaced on this. Let me spin something up...

Edit: spun up #379

@digitalmoksha
Copy link
Contributor

@gjtorikian I'm curious, have you considered creating a Rust version of html-pipeline? I'm thinking about moving some of our filters into a Rust based pipeline for speed 🤔

@gjtorikian
Copy link
Owner Author

I haven't thought about it—but walk me through which part you would want/expect to Rustify ? All I do these days is wrap Rust in Ruby. 😆

V3 moved the bulk of the HTML selection-manipulation logic to using selma, which uses lol-html under the hood. html-pipeline is now just a dumb interface which takes an array of Ruby classes and iterates over their selectors; but the real manipulation work is done in Rust, and the Ruby class just acts as a sort of sugar on top. If anything, I'd like to move towards turning this into an async library (which is partly why I haven't solidified v3 yet--haven't had time to explore what this would entail).

@digitalmoksha
Copy link
Contributor

I think it would be basically the same as what you have now, just in Rust - given a vector of filters, run through them calling their transformation function, passing results from one to the other.

Still coming up to speed on Rust's object oriented features, but it seems like using traits might give you the ability to not only gain default functionality of say a TextFilter, but allow you to override that functionality as well.

So if we have our own Rust crate which we can move some of our current Ruby filters/pipeline into, then I think we would see some performance win.

Haven't yet attempted to migrate to V3 of html-pipeline, so maybe that would be enough of a win. But I'm still considering having some type of pipeline ability in our Rust crate.

So I thought you might have something in the works ;-)

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