Giter Site home page Giter Site logo

hapticx / happyx-native Goto Github PK

View Code? Open in Web Editor NEW
18.0 3.0 1.0 470 KB

Macro-oriented web-framework compiles to native written with ♥

Home Page: https://hapticx.github.io/happyx-native/happyx_native.html

License: MIT License

Nim 92.13% Java 7.45% HTML 0.42%
app-framework frontend happyx native-apps nim web-native webnative

happyx-native's Introduction

HappyX Native

macro-oriented web-framework compiles to native

API Reference

Install

nimble install happyx-native

or via GitHub:

nimble install https://github.com/HapticX/happyx-native

Features

  • Support for Chrome/Yandex/Edge browsers;
  • Support for Android;

Project Initialization

To init project you should use this command:

hpx-native init --name ProjectName

This command will automatically initialize your project.

It also fetches ANDROID_SDK_ROOT from environment (need for android compilation).

Building

To build your project you should move into project folder

cd ProjectName

and just build it!

hpx-native build

This automatically builds your project for your OS as target platform.

Cross-Compilation

To compile for other OS use

hpx-native build --target linux

Possible values:

OS value aliases
Windows windows win
Linux linux unix
MacOS macosx mac, macos
Android android -

Android compilation

You should have:

  • Android Studio with SDK and NDK;
  • Gradle >= 7.5;
  • Nim >= 2.0.0;

By default hpx-native build --target android supports all android architectures. If you want to disable some architectures then use:

hpx-native build --target android --no-x86_64

Possible architectures

Architecture Disable Argument
x86 --no-x86
x86_64 --no-x86_64
armeabi-v7a --no-armeabi-v7a
arm64-v8a --no-arm64-v8a

If you doesn't want to use gradle building then use

hpx-native build --target android --no-gradle

This command will build only .so libraries.

Building Assets

HappyX Native supports "building" assets - all resources from app directory (by default /assets) and all subdirectories are "sewn" into executable file.

This way you can distribute your application over the network with only one executable file.

This option can be disabled via --no-build-assets

Browsers

If you want choose other browser instead of default - use these flags:

browser flag
Default browser uses by default
Chrome -d:chrome
Edge -d:edge
Yandex -d:yandex

happyx-native's People

Contributors

array-in-a-matrix avatar ethosa avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

happyx-native's Issues

Browser finder suggestion

What about make 'define browser:any'? It could be very useful, because if you wanna use HappyX-Native for app production, like game launcher or other: you still don't know what browser use your user. The same idea i see in WebUI, but it's C library and Nim wrapper very buggy.
Thank's for your hard work!

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.