SyminStudio.TauriApi
0.4.4
dotnet add package SyminStudio.TauriApi --version 0.4.4
NuGet\Install-Package SyminStudio.TauriApi -Version 0.4.4
<PackageReference Include="SyminStudio.TauriApi" Version="0.4.4" />
<PackageVersion Include="SyminStudio.TauriApi" Version="0.4.4" />
<PackageReference Include="SyminStudio.TauriApi" />
paket add SyminStudio.TauriApi --version 0.4.4
#r "nuget: SyminStudio.TauriApi, 0.4.4"
#addin nuget:?package=SyminStudio.TauriApi&version=0.4.4
#tool nuget:?package=SyminStudio.TauriApi&version=0.4.4
Tauri + Blazor
This template should help get you started developing with Tauri in Blazor, C#, CSS and Javascript.
Recommended IDE Setup
Getting Started
- run
dotnet watch
in thetauri-blazor-demo/src/
directory to start the frontend. - run
cargo tauri dev
in thetauri-blazor-demo/src-tauri/
directory to start the application in development mode.
How To Use
- Add nuget package to your project.
dotnet add package SyminStudio.TauriApi --version 0.4.4
- Add following contents to your
Program.cs
file.
using TauriApi;
using TauriApi.Plugins;
// ...
builder.Services.AddTauriApi();
builder.Services.AddTauriPlugin<TauriOpener>();
// ...
- Add global using to the
_Imports.razor
file.
@using TauriApi
@using TauriApi.Plugins
- Now you can inject and use api in your components.
@inject Tauri Tauri
@inject TauriOpener Opener
<YourComponents/>
@code{
private string? GreetInput { get; set; }
private string? GreetMsg { get; set; }
private async Task GreetAsync()
{
GreetMsg = await Tauri.Core.Invoke<string>("greet", new { name = GreetInput });
await Opener.OpenPath("https://demosite")
}
}
Supported APIs
The module
@tauri-apps/api/{moduleName}
is mapped toTauri.{ModuleName}
property. The constructor of the class is mapped toTauri.{ModuleName}.Create{ClassName}()
method. The plugins are mapped toTauri{PluginName}
class.
- api/app
- api/core
- api/event
- api/image
- api/path
- api/window (partial)
- plugin/fs (wip)
- plugin/opener
Warning
This package is not yet ready for production. It is a work in progress and should not be used in production applications. It is intended for development and testing purposes only. Use at your own risk. This package only supports Tauri 2.0 since version 0.3.0.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net6.0 is compatible. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 is compatible. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net6.0
- Microsoft.AspNetCore.Components.WebAssembly (>= 6.0.23)
-
net8.0
- Microsoft.AspNetCore.Components.WebAssembly (>= 8.0.10)
-
net9.0
- Microsoft.AspNetCore.Components.WebAssembly (>= 9.0.2)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Add Path and Opener plugin.