Added menu functionality. (#58)

* Added core::Channel and menu functionality. core::Channel may leak memory.

* Added leptos example.
This commit is contained in:
bicarlsen 2024-08-02 15:31:56 +02:00 committed by GitHub
parent aa3a64af11
commit 115009d4bf
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
44 changed files with 1319 additions and 13 deletions

View file

@ -51,8 +51,9 @@ fn main() {
All modules are gated by accordingly named Cargo features. It is recommended you keep this synced with the features enabled in your [Tauri Allowlist] but no automated tool for this exists (yet).
- **all**: Enables all modules.
- **core**: Enables the `core` module. (Only `invoke` and `convertFileSrc` currently implemented.)
- **core**: Enables the `core` module. (~70% implmented)
- **event**: Enables the `event` module.
- **menu**: Enables the `menu` module. (~20% implemented)
- **window**: Enables the `windows` module. (~20% implemented)
## Are we Tauri yet?
@ -64,7 +65,7 @@ These API bindings are not completely on-par with `@tauri-apps/api` yet, but her
- [x] `dpi`
- [x] `event`
- [ ] `image`
- [ ] `menu`
- [x] `menu` (partial implementation)
- [ ] `mocks`
- [ ] `path`
- [ ] `tray`
@ -74,6 +75,9 @@ These API bindings are not completely on-par with `@tauri-apps/api` yet, but her
The current API also very closely mirrors the JS API even though that might not be the most ergonomic choice, ideas for improving the API with quality-of-life features beyond the regular JS API interface are very welcome.
## Examples
The [`examples/leptos`] crate provides examples of how to use most of the implemented functionality.
[wasm-bindgen]: https://github.com/rustwasm/wasm-bindgen
[tauri allowlist]: https://tauri.app/v1/api/config#allowlistconfig
[`esbuild`]: https://esbuild.github.io/getting-started/#install-esbuild