-
Notifications
You must be signed in to change notification settings - Fork 347
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
Add lib.rs so difftastic can be used as a library (& serde) #231
base: master
Are you sure you want to change the base?
Conversation
5cee347
to
3787240
Compare
looks related to the issue I opened a week ago |
Maybe add an optional feature that can be enabled for serde support so that most users don't have to build serde and its dependencies when compiling the binary |
@petr-tik hope it helps. I'm curious what you're using difftastic for. (Until this gets merged, you can always depend on my repo). |
I also have a use case for using this as a library, is this PR dead? |
Same here, I also need the library use case. Anything we can do to help get this done @Wilfred ? Happy to help, but want to know what we need to do to get this over the line besides re-basing. The use-case is to be able to pass 2 strings representing LHS and RHS files, get the results back to know what lines have changed and what parts of the lines are novel w/ start and end position. Then act on certain scenarios programatically. This avoids writing to disk and parsing the existing CLI output. There's also the use-case for json output in PR #158. These seem related. The library method and json should have the same output shape. That one is close but didn't tell me which tokens were novel, locally I added it and it works but this library scenario would be much better. |
Add complexity check to smoke_test.sh
Any updates on this? |
I'm also looking to integrate difftastic into my editor |
@Wilfred sorry to tag you here :) but it would be immensely useful to more than one person if this could be done. |
I'd also like to wrap difftastic with pyo3 (similar Python libs in this space are pretty slow) |
It seems like the issue was mistakenly closed by bf4331c, perhaps due to a typo of |
Would like to see this too. |
Sorry for mixing two changes together like this.
lib.rs
and moved some relevant functionality to it.main.rs
works as before.Serialize
andDeserialize
onDiffResult
so I added that too.