Jaxon: Package Manager
Published 11/13/2024
The reason I created Jaxon was to aid development with SJC - a native compiler that supports a custom Java 1.6 dialect.
SJC is the compiler, Stefan created it and gave it free to the world. I figured I could help out by creating tooling for SJC. Jaxon is the name for the project that contains that tooling. Jaxon is meant to act as a swiss army knife for getting new developers started with SJC.
Part of making Jaxon accessible to developers was to create some sort of central package manager. Since SJC is compiled to such a low level language (x86 assembly) - I figured instead of focusing on DLLs, cross compiling, or anything like that - Instead we could instead just share raw source-code templates, or finished projects. The community for SJC programs is currently small enough that it fit entirely in the Jaxon central repo, and I’ve done my best to keep them up-to-date.
Another major benefit to creating the package manager, was it helped link all the various SJC projects to a central repo. I think encouraging the community to visually see how everyone has implemented their SJC code is very important when trying to design a standard - something I’ve been trying to tackle for a while.
I decided to take all the existing SJC projects and update them to work with the Jaxon work flow. This includes adding build scripts, repackaging the files and separating the JRE from the main application code. The thought behind this, is to make compiling SJC a standard and shared experience. As a benefit it also allowed me to fully test Jaxon in the wild against real SJC projects. This allowed me to add updates that I wouldn’t have thought of without those specific projects requiring them. (Various command line flags, etc)
The technology behind the central package manager backend is powered entirely using the GitHub public API. The main Jaxon repo contains the package list and currently hosts the files directly. This gives the community full transparency to review all the source code directly, along with historical snapshots to encourage timeline reviews.
package.list
The entire package manager is loaded off of the single package.list. We create an initial HTTP request and cache the values in memory (optionally to disk).
- Picking a random entry from the list -
standard-library=0.1.0=https://github.com/Konloch/Jaxon/tree/2a0dbec29623f1fa63004341e77dcb6d00b4025e/community-projects/application/standard-library- It’s separated by the equals sign, so consider that a reserved character.
- The
standard-libraryis currently at version0.1.0as of writing. It can be viewed using the repo snapshot link herehttps://github.com/Konloch/Jaxon/tree/2a0dbec29623f1fa63004341e77dcb6d00b4025e/community-projects/application/standard-library
- When a new entry gets added, the old is preserved so old builds that rely on the older versions still can be built without issue.
console=0.1.0=https://github.com/Konloch/Jaxon/tree/053e90efa657cc65d35eb462fe0dd6abb6896585/community-projects/application/demo-consoleconsole=0.0.9=https://github.com/Konloch/Jaxon/tree/2a0dbec29623f1fa63004341e77dcb6d00b4025e/community-projects/application/demo-console
- When we install a template using the package manager, we’re using the GitHub API. We download all the various files contained within the repo snapshot.
- To future-proof the system, technically package.list can link to different repos on GitHub. However, the reason we keep them linked on the main repo is to ensure they do not get removed at a future date.
The idea behind everything being source related, is it’s meant to encourage a source code forward way of programming. In the sense of removing the barrier of pre-compiled code, and providing templates for new programmers from day one.
I’m still trying to write the standard JRE implementation, there are a lot of really well done JRE implementations in the SJC community. I’ll finish my version eventually and publish that, but for now I’ve submitted what I could.
If you’d like to talk more about Jaxon, or SJC - feel free to join the Discord Server and ping me there. Let me know what it’s about - so I can respond quicker.