Skip to content
/ neon Public

Cross-platform Application on native runtimes. Target iOS, Android, smartWatch, smartTelevision, Desktop (macOS, Windows, Linux) and also Browser, all native.

License

Notifications You must be signed in to change notification settings

cocrafts/neon

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

37 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

WebsiteAPI DocsFeatures TutorialPlaygroundDiscord

Neon is a library for creating cross-platform user interfaces that run everywhere on native runtime!

Neon unique characteristics:

  • Bare metal/native, no intermediate/embedded runtime - which allow Neon easily target devices like: IoT, smartWatch where embedded runtime e.g Javascript is too expensive to afford.
  • Instead of using Virtual DOM or Runtime Diffing, Neon generate/optimize its templates at Compile Time (like Svelte) and updates them with fine-grained reactions (like SolidJS) for the best performance.
  • Neon use Haxe language/syntax - part of ECMAScript family, Javascript developer would find it extremely familiar, like home.

At a Glance:

package myApp;

import js.Browser.document;
import neon.platform.browser.Renderer;
import neon.core.Common;
import neon.core.Style;
import neon.core.State;

class Main {
    public static function main() {
        render(document.body, App, {name: "My App"});
    }
}

typedef AppProps = {
    var name:String;
};

var App = createComponent(function(props:AppProps) {
    var count = createSignal(0);
    var doubleCount = function() {
        return count.get() * 2;
    }

    var handleClick = function() {
        count.set(count.get() + 1);
    }

    return createElement("div", {style: styles.container}, [
        createElement("h1", {}, [
            "welcome ", props.name,
        ]),
        createElement("h2", {click: handleClick}, [
            "counter is: ", count.get(),
        ]),
        createElement("h2", {}, [
            "doubleCount is: ", doubleCount(),
        ]),
    ]);
});

var styles = createStyle({
    container: {
        color: "red",
        userSelect: "none",
        "@media (max-width: 768px)": {
            color: "green",
        }
    },
});

Platform support status:

  • Browser
  • Server side rendering, including Node.js (good for portable runtime like AWS Lambda Edge), and also include C++ target (offer blazing fast performance)
  • macOS (POC implementation)
  • Windows (POC implementation)
  • Linux (POC implementation)
  • iOS
  • Android
  • Other targets like VR/AR, smartWatch, smartTv, IoT devices..

Screenshots:

macOs Sonoma 14.2.1

About

Cross-platform Application on native runtimes. Target iOS, Android, smartWatch, smartTelevision, Desktop (macOS, Windows, Linux) and also Browser, all native.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published