limikael / appy Goto Github PK
View Code? Open in Web Editor NEWDeclarative UI framework in Rust
License: MIT License
Declarative UI framework in Rust
License: MIT License
The appy
binary, which is currently written in src/cl/bin.rs
, should be its own separate crate.
That way, the dependencies of the library and those of the binary can be completely separated out, so if someone uses the Appy library in their project, they'll only need to compile these dependencies.
Hi, thanks for your hard work on appy/glapp/apk-sdl, those crates saves me a lot of time, with "how to run sdl on android and stay sane" problem
Do you have any thoughts on "How to implements Glium API with SDL2?"
I checked Glium source, and it's look like I need to implement custom backed and create my own context with it
Support miniquad, https://crates.io/crates/miniquad for rendering context management.
where should they be gotten from? bundle images with exe?
Scale factor should be taken into account. How?
I have read that glutin supports getting the device scale factor, but not SDL... can't find the resource now...
currently the instances leak...
it should be possible to do:
<mycomp key="blabla"/>
What should be the datatype for keys?
Something like use_spring, inspired by https://www.react-spring.dev/
On a deeper level, it isn't currently possible to get the screen to refresh, or invoke functions to run on a timer, so this needs to be added first.
i try to run the hello example and the compiler can't find the glapp dependency path
❯ cargo r --example hello
error: failed to get `glapp` as a dependency of package `appy v0.1.6 (/home/cargo/Repo/appy)`
Caused by:
failed to load source for dependency `glapp`
Caused by:
Unable to update /home/cargo/Repo/glapp
Caused by:
failed to read `/home/cargo/Repo/glapp/Cargo.toml`
Caused by:
No such file or directory (os error 2)
Currently, apx! macro:
<hello prop1="val"/>
Is syntactic sugar for:
Element::create(hello,Props_hello{prop1: "val"})
This more or less forces the use of the macro, because the code without the macro looks very ugly. As an alternative, instead of having elements just be functions that take props, they can actually be part of the struct. The way to define an element would then be slightly different. Instead of:
struct MyElement {
pub prop1: String
}
#[function_component]
fn my_element(p:MyElement, c:Elements)->Elements {
}
... it would be ...
#[component]
struct MyElement {
pub prop1: String
}
impl Component for MyElement {
fn render(p:Self) {
}
}
Then, the #[component]
macro could actually create a builder. Also it would add the children prop to the struct. (for this reason it cannot be a derive macro, since derive macros cannot modify the struct or add to it). It would now be possible to write:
MyElement::new().prop1("hello")
And if it takes children:
MyElement::new().prop1("hello").children(/*...*/)
And then the XML would just be syntactic sugar for the above.
Advantages:
Disadvantages:
The rect drawer should support:
The vision is to have a use_font hook. so it would be like:
#[function_component]
fn my_comp(p: MyProps, c:Elements)->Elements {
let f=use_font(FontSpec::new("thefont").size(10).charset(Charset::Ascii));
f.get_line_width("blabla") // the with of a line of text
f.get_paragraph_height("blasdf\nasdfasf",100) // the height of a paragraph, if fit into a width of 100
apx!{
<text text="hello" font=f/>
}
}
currently there is a gpu cache thingy, but it doesn't work well at all. look at:
it was a noob thingy...
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.