Go bindings
Hey there!
Just wanted to ask if there are some plans to have Go bindings as well?
Another question would be if you may consider adding into a built-in method a way to get the characters delta between the given string and the returned, cured, string. Currently have plans of doing it manually - but maybe something that people could benefit of as well.
Cheers and thanks for that project :D
Hai Krypton! Didn't expect to see a familiar face here haha, haven't seen you in a long time! Thank you so much for the support! :heart:
Yeah, there were plans to create a Go binding, but back then I didn't have the Go skills to integrate it with my Rust crate through FFI (especially porting it across several platforms). Maybe soon!
For character delta, I feel like that would be a bit of a complex feature to implement, especially since I have unicode bidi implemented (this could exponentially get more complicated if you add in Arabic or Hebrew characters, since the library reads them from left-to-right).
Hey, I tried to get a Go binding working with cgo but I've been struggling with it on Windows (since it seems to depend on MinGW instead of MSVC). Working on this would take a lot of time. Considering I am busy right now, I'll work on this later. So be patient!
Hey there!
If you don't mind, I can try to test around some things based on what you've managed to do so far. I should have cgo working on my machine and VM.
Thank you for considering it :D
No worries! :heart:
Can you try this? As per the readme:
$ git clone https://github.com/null8626/decancer.git --depth 1
$ cd decancer/bindings/go
$ sudo -E "PATH=$PATH" go generate
$ go test
go generate still requires Rust to be installed, but at least once you've built and installed it, you can use it in any Go project you want!
I tried to keep Rust away from the build process yesterday but I can't, as this would introduce dozens of prebuilt binaries to the repository, which would bloat it even further (Java's bindings.zip and WASM's decancer.wasm are already big enough for me).
As mentioned over on Discord, looks all good on macOS & Linux (Debian):
Thankiess!! ❤️
Oh by the way, don't forget to add defer cured.Close() after your err check, forgot to add it in my readme example haha!