-
Notifications
You must be signed in to change notification settings - Fork 42
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 bindings for dart #136
base: master
Are you sure you want to change the base?
Conversation
This is looking great, thanks @m-haisham. Don't worry about the docs, I'll add those and do some more general package cleanup tasks myself once it's merged, including structuring the project, some minor reformatting, and setting up CI. How will the native binary be distributed? It looks like we can publish to the official pub.dev, but does that allow for bundling binary files? Alternatively, we'll need a post-install script that downloads the appropriate binary for the platform. |
…rectory and parents
The easiest solution would be to have it download the appropriate library files for each platform during build |
Hello m-haisham, Thank you for your contribution to the library by adding Dart bindings! It's great to see the community working together to improve the library. The example file you included in the example folder is helpful and makes it easier for developers to use the library with Dart. However, as you mentioned, it would be great to have documentation to go along with the bindings. |
This pull request adds Dart bindings to this library. The bindings will allow Dart to load and interact with the library using C-Interop.
I've also included an example file,
example/minify_html_example.dart
, in the example folder to demonstrate how to use your library with Dart.TODO: Documentation
Run
Move into dart directory
cd dart
Run the following command to build and move the library to an accessible place
cargo build -r --manifest-path native/Cargo.toml && mv native/target/release/libminifyhtml.so .dart_tool/minifyhtml
Run the example