Git Product home page Git Product logo

tauricspoc's Introduction

Tauri-CSharp-POC

About

  • This is a proof-of-concept tauri-like implementation using C#. Tauri provides a mechanism to build a native js/typescript application for Mac/Windows/iOS by hosting a WebView and using IPC to call Rust functions from the front-end.
  • This project does something similar, using .NET MAUI as the UI framework, pointing a webview to a locally hosted app, and hosting a websocket server to allow native method calls from js/typescript with C#/.NET core.

Components

  • nativeclient/ is the Next.js app created with create-t3-app.
    • index.tsx is a sample using the invoke() to call the native C# code.
    • NativeSocket.ts is the api that would be provided similar to Tauri's front-end library, used to invoke native methods from js/typescript.
  • nativemaui/nativemaui is the native client app that also hosts the websocket server
  • nativemaui/nativecore is the core library that a user would have to import and decorate their RPC/native classes with [Processor] and methods with the [Request] attribute.
  • nativemaui/nativeexternal/EchoProcessor.cs is an example of a native class/method implementation that can be called from the front-end. This is similar to the main.rs in a tauri app, and the assembly produced from this is loaded dynamically at runtime. invoke() on the client side works by using reflection to find the name of the method being called and invoke it with the named parameters passed from the client.

tauricspoc's People

Contributors

datbear avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.