Convert web app into an apk


First let me say that cargo apk works surprisingly well. kudos!

Now to the point. I have a small web app in Rust that I would like to try in an android device. I have the following questions:

  1. What would be the right way to start the webserver and open the browser?

  2. How I use the assets? The example on does not seem to work

  1. That example is outdated. You need to add
assets = "<path-to-assets>"

to your Cargo.toml, like here:


hey @hgrecco - did @ozkriff solution worked for you?


I just realized that the version of cargo-apk and android_glue on were very old. I published new versions.


@ozkriff and @tomaka. It works now. Thanks a lot. Any idea about the other question? My application starts a local web server and I want to open a browser pointing to it, and close the application when the browser is closed.