How to package into a dart package and upload it to pub.dev for others to use
mdddj opened this issue Β· comments
I found that the plugin depends on this package, there are some scripts in it, but it can't be uploaded to pub.dev, is there any other way to do it?
rust_lib_aria2_plugin:
path: rust_builder
Hi, flutter_rust_bridge allows arbitrary approaches for this. For example, you can have a look at cargokit (which is also used by flutter_rust_bridge's default template). Its sample usage will guide you through how to make a publishable package.
Hi, and thank you for your response. I tried adding the cargokit to the plugins folder as outlined in the blog article, along with certain configuration settings. Unfortunately, the cargokit does not initialize correctly. Please find below the list of files I have added or modified for your reference. (Flutter plugin in Rust with no prebuilt binaries)
await RustLib.init();
![image](https://private-user-images.githubusercontent.com/29020213/313392180-3ba8c642-82f2-4337-81fc-6f2093885730.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MTM2NjI4MTYsIm5iZiI6MTcxMzY2MjUxNiwicGF0aCI6Ii8yOTAyMDIxMy8zMTMzOTIxODAtM2JhOGM2NDItODJmMi00MzM3LTgxZmMtNmYyMDkzODg1NzMwLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA0MjElMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNDIxVDAxMjE1NlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWVmMThhMzZkYWU0OGY0YmJiYzQxN2M2YTJlMGFhMDlkYWMzNDFjODc1NDM0YTg2NGY1NjdmNGZjNDY2MTZmMWYmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.YC-nJeiC2rMmOa4IzeghdEmB4vlFJY5h2P4rr56xUBU)
![image](https://private-user-images.githubusercontent.com/29020213/313392193-dbd0f2ac-34b6-4497-bac5-b296635a8f0f.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MTM2NjI4MTYsIm5iZiI6MTcxMzY2MjUxNiwicGF0aCI6Ii8yOTAyMDIxMy8zMTMzOTIxOTMtZGJkMGYyYWMtMzRiNi00NDk3LWJhYzUtYjI5NjYzNWE4ZjBmLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA0MjElMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNDIxVDAxMjE1NlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTAxNzRmODY2MTdmMzhlOTAwNzNjMThiZmNhYzdmN2EyMGU5ODVkZjFmMDRjODk4ODI1OTlhZDFlNWQ2MzVhN2QmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.wT0JcqgUMIBaG9LxUkZmc7ndn01HhefGJ2Re-WLaX88)
![image](https://private-user-images.githubusercontent.com/29020213/313392240-6853a941-62d6-4985-a447-bd95fbb9946f.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MTM2NjI4MTYsIm5iZiI6MTcxMzY2MjUxNiwicGF0aCI6Ii8yOTAyMDIxMy8zMTMzOTIyNDAtNjg1M2E5NDEtNjJkNi00OTg1LWE0NDctYmQ5NWZiYjk5NDZmLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA0MjElMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNDIxVDAxMjE1NlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWU0ZThkMjhmY2M1YjE3Y2E1YTJkN2MyNTIzZTQ2MTIyNWVlYzg2NTJiY2IyYTFmYTAzZDdmMWY4ZDcwMWMzMDEmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.T_f2V2E3cJnwRxvuLK-c-n10wYHfEgIrzc5MMF3sXvg)
Unfortunately, the cargokit does not initialize correctly.
Hi, seems that the cargokit part has not succeed yet. Then one way is to firstly go through the cargokit tutorial to make a running demo, and (only after success) add flutter_rust_bridge and make it work.
Hi,Thank you, in your way, solved this problem, closed this issue ππ»ππ»ππ»
You are welcome and happy to see it is solved!
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new issue.