#Access frontendDist from Rust
1 messages · Page 1 of 1 (latest)
Hey, for me understanding it more explicitly: you want to expose the files themselves or do you want to serve the content via webserver? Do you need to expose Tauri commands or just frontend code wiethout API access?
just frontend code without API access, I didn't think that was something I could do within Tauri so I was trying to use axum. The issue I was having basically comes down to https://github.com/tauri-apps/tauri/issues/8411
So you have solved the exposure for production builds (with a workaround in dev)?
yes
Great, I'll try to add this note to the documentation for now and poke some other devs if that's a quick fix. Otherwise PRs are always welcome.
thanks, the documentation thing would make a big difference, maybe once I understand Tauri a bit better I'll try for a PR, for now I'm very new to this project
another thing I couldn't find in the documentation is the difference between assets and resources, in colloquial english those are almost synonymous and the distinction in tauri isn't really laid out anywhere
For reference: Where did you encounter this usage to be confusing? Are both words used in the same context/document?
You have an AssetResolver class and an assetProtocol in tauri.conf.json and then you separately have a resources section of tauri.conf.json and a PathResolver class. I believe that assets are the contents of frontendDist which are embedded in the executable (in prod builds) and resources are separate files, bundled with but not embedded in the exectuable, and not part of the frontend.
Agreed that we should add some nomenclature/addition to our docs around this 👍 I understand it the same way but afaik only resources are described whereas assets are not explicitly explained.
yes, agreed, I kept coming back to that page and finding it wasn't quite what I wanted
Could you open up an issue (if not already existing) in https://github.com/tauri-apps/tauri-docs for this?
Done