GithubHelp home page GithubHelp logo

koresframework / kores Goto Github PK

View Code? Open in Web Editor NEW
4.0 3.0 0.0 8.45 MB

Generate source code & bytecode from an abstract representation tree (AST). Bytecode generation framework.

Home Page: http://koresframework.github.io/Kores/

License: Other

Java 22.21% Kotlin 77.79%
bytecode source-representation source-generation java kotlin

kores's Introduction

Kores

Documentation MIT License jitpack Discord Actions Packages

Kores is a framework which provide to developers a way to construct bytecode and source from a common structure.

How to use Kores

Kores is now using GitLab Packages to distribute its binary files instead of jitpack.io (because jitpack still not support all JDK versions and sometimes jitpack.yml simply do not work).

Then configure your build.gradle as the following:

repositories {
    mavenCentral()
    maven {
        url "https://gitlab.com/api/v4/projects/28895078/packages/maven"
    }
    maven {
        url "https://gitlab.com/api/v4/projects/28894889/packages/maven"
    }
}

dependencies {
    implementation "com.koresframework:kores:4.2.1.base" // Replace the version with the latest or a preferred one
}

This is only needed because GitHub still not support unauthenticated artifact access.

Projects using Kores

CodeAPI 2 (old name):

All my projects is already updated.

CodeAPI 3 (old name):

All my projects have a Kores 4 beta version.

Kores 4 (beta):

  • EventSys

    • A dynamic property base event system written on top of Kores
  • CodeProxy

    • A Proxy generator written on top of Kores, the key difference between Java proxies is that CodeProxies can extend classes.
  • AdapterHelper

    • A set of utilities to help with creation, registration and management of Adapters, some features requires Kores, such as deep instance adapting.

Performance

In the beginning of Kores, performance was one of the priorities, but when I finished version 2, I noticed that the performance never was a problem, I always try to improve performance by looking the performance results (using JMH), the biggest performance problem is not with the project, but with JVM itself: classloading takes too much time.

Note for contributors: Performance improvement pull request will be always strictly analyzed, some optimizations that I thought about doing, was not needed because JVM was able to solve the problems in the 3rd-4th time execution of the code.

Kores 4

In Kores 4, some interfaces was changed to concrete final classes (design decision...) to maintain consistency.

The main difference between Kores 4 and older versions is that Kores 4 is written with JVM in mind, in older versions, you have the free to put whathever in anywhere, example, a println method invocation in class body or outside of the class, in Kores 4 it is not possible.

Tutorials

Coming soon

Code Generation and Reading

BytecodeWriter SourceWriter BytecodeReader

Systems

Kores-Base systems (may be interdependent):

  • Structure (aka base)

    • Structure of the code, like classes, methods, fields, variable assignment, etc.
  • Builder

    • Builder of instances, like structure instances and common classes instances.
  • Factory

    • Factory of instances, like structure instances and common classes instances.
  • Conversion

    • Conversions between types, from/to Kores type to/from other types.
  • Inspection (only inspect package)

    • Inspections and analysis (flow analysis, code source analysis, ...).
  • Generator

    • Generator from Kores structure to other structures.
  • Validator

    • Validates Kores structures.
  • Misc

    • Miscellaneous: cover all other systems, it includes utility classes, modify.visit package, helper classes, type inference, etc...

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.