Giter Club home page Giter Club logo

dioxus-makepad-prototype's Introduction

Dioxus meets Makepad experiment

What we tested here

The file example/src/main.rs contains a very simple Dioxus aplication. It renders a button and a text indicating how many times the button was clicked. In the src folder we implemented the minimal glue to have this application rendered using Makepad. It only supports a few of HTML tags (div, h1, h3, p, button), but it should be easy to expand this list.

Regarding event handlers, it currently is able to handle click events for buttons. It is capable to send to connect Makepad events to the specific handler defined in the Dioxus app, calculate what has to change in the UI and get back to Makepad. Note that async code is not supported in this prototype yet. One limitation is that buttons should be not nested in order to work (an issue that is not hard to fix though).

How to run the demo application

cd examples
cargo run

What's next?

Most of the code is experimenatal, so everything could be implemented much better.

We're using JSON serialization for templates/mutations coming from Dioxus virtual DOM just because it was quicker way to have this demo working, but I would implement a Rust middle layer to represent that information with appropiate data types.

Also, the metadata included in templates/mutations is only partially captured by Makepad side. We have to discover what we should persist in Makepad to better process mutations as they comes from Dioxus.

CSS styles will need to be fully translated to the Makepad style/layout system. This would be sort of a massive task, but we have some initial examples done in this repo.

And, of course, keep iterating with more demo apps, in order to be able to render and respond to more events.

dioxus-makepad-prototype's People

Contributors

jmbejar avatar

Stargazers

wh7f avatar huoxiangdong avatar Sandalots avatar Kevin Boos avatar Jonathan Kelley avatar alanpoon avatar

Watchers

 avatar  avatar

Forkers

jkelleyrtp

dioxus-makepad-prototype's Issues

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.