
Shared intermediate representation and interface-definition language enabling safe cross-language translation and coexecution, with text schema format, parsing/verification, CLI REPL, and package-managed distribution.
= parz
image:https://github.com/OmyDaGreat/parz/actions/workflows/gradle.yml/badge.svg[Gradle Build] image:https://github.com/OmyDaGreat/parz/actions/workflows/publish.yml/badge.svg[Publish] image:https://img.shields.io/maven-central/v/xyz.malefic.parz/bom[Maven Central Version] image:https://img.shields.io/scoop/v/parz?bucket=https%3A%2F%2Fgithub.com%2FOmyDaGreat%2FMaleficBucket[Scoop Version]
A shared intermediate representation (IR) and interface definition language (IDL) for programming languages.
== Overview
parz aims to let different languages be translated into each other and, more importantly, be run side by side safely.
=== Current Features
An IDL system, implemented through a Kotlin model and a text format with parsing and verification.
A CLI program, serving as a schema checking tool for the IDL system and packaged through Scoop and Homebrew.
=== Goals
A generic IR defined through the IDL, wide enough that any language can use it but narrow enough that it supports really old languages (possibly using scoped compilers to lock out new features).
A large set of frontends and backends for programming languages.
A verification tool that tests edge cases of the IDL and code equivalence while using the compilers. Also allows translation, including non-deterministic translation with AI, to be verified extremely easily.
== Usage
=== Libraries
NOTE: All currently published libraries support JVM, Android, iOS, & js through Kotlin Multiplatform
It's recommended to use the BOM for version alignment. See the https://github.com/OmyDaGreat/parz/releases[Releases] page for the latest version, assigned either to the BOM or directly to each package.
Currently, you can describe your types through the IDL and check values against them.
parseSource(source) from idl-syntax, which returns the syntax tree for the schema.
** Refer to link:tooling/cli/src/main/kotlin/[tooling/cli] for a basic implementation of a schema parser (specifically for text-based implementations).=== CLI The CLI tool can be obtained through a package manager:
brew install OmyDaGreat/malefic/parz
NOTE: Make sure you have the package manager installed first! You can install it through https://brew.sh/[Homebrew] or https://scoop.sh/[Scoop]. If you don't want to use a package manager, you can also install the packages from the https://github.com/OmyDaGreat/parz/releases[Releases] page.
If you run the program with a file, it prints the output of running that file as if it were input.
Run it without input to type schemas in directly. End each one with ;; to parse it:
Line editing and history (kept in ~/.parz_history) are built in.
As you could probably tell, the inspiration for the tooling cli came from OCaml's UTop. However, this implementation only supports types and not values for now (as the IR has not yet been created).
Here's an example run:
image::run.png[Example Run]
== License
This project is licensed under the GNU AGPLv3. View the link:LICENSE[LICENSE] file for more information.
== Contributing
== Resources
= parz
image:https://github.com/OmyDaGreat/parz/actions/workflows/gradle.yml/badge.svg[Gradle Build] image:https://github.com/OmyDaGreat/parz/actions/workflows/publish.yml/badge.svg[Publish] image:https://img.shields.io/maven-central/v/xyz.malefic.parz/bom[Maven Central Version] image:https://img.shields.io/scoop/v/parz?bucket=https%3A%2F%2Fgithub.com%2FOmyDaGreat%2FMaleficBucket[Scoop Version]
A shared intermediate representation (IR) and interface definition language (IDL) for programming languages.
== Overview
parz aims to let different languages be translated into each other and, more importantly, be run side by side safely.
=== Current Features
An IDL system, implemented through a Kotlin model and a text format with parsing and verification.
A CLI program, serving as a schema checking tool for the IDL system and packaged through Scoop and Homebrew.
=== Goals
A generic IR defined through the IDL, wide enough that any language can use it but narrow enough that it supports really old languages (possibly using scoped compilers to lock out new features).
A large set of frontends and backends for programming languages.
A verification tool that tests edge cases of the IDL and code equivalence while using the compilers. Also allows translation, including non-deterministic translation with AI, to be verified extremely easily.
== Usage
=== Libraries
NOTE: All currently published libraries support JVM, Android, iOS, & js through Kotlin Multiplatform
It's recommended to use the BOM for version alignment. See the https://github.com/OmyDaGreat/parz/releases[Releases] page for the latest version, assigned either to the BOM or directly to each package.
Currently, you can describe your types through the IDL and check values against them.
parseSource(source) from idl-syntax, which returns the syntax tree for the schema.
** Refer to link:tooling/cli/src/main/kotlin/[tooling/cli] for a basic implementation of a schema parser (specifically for text-based implementations).=== CLI The CLI tool can be obtained through a package manager:
brew install OmyDaGreat/malefic/parz
NOTE: Make sure you have the package manager installed first! You can install it through https://brew.sh/[Homebrew] or https://scoop.sh/[Scoop]. If you don't want to use a package manager, you can also install the packages from the https://github.com/OmyDaGreat/parz/releases[Releases] page.
If you run the program with a file, it prints the output of running that file as if it were input.
Run it without input to type schemas in directly. End each one with ;; to parse it:
Line editing and history (kept in ~/.parz_history) are built in.
As you could probably tell, the inspiration for the tooling cli came from OCaml's UTop. However, this implementation only supports types and not values for now (as the IR has not yet been created).
Here's an example run:
image::run.png[Example Run]
== License
This project is licensed under the GNU AGPLv3. View the link:LICENSE[LICENSE] file for more information.
== Contributing
== Resources