https://github.com/iconmaster5326/binarygen
  
  
    Generate binary files as well as text files with JetBrains MPS. 
    https://github.com/iconmaster5326/binarygen
  
binary jetbrains jetbrains-mps mps
        Last synced: 3 months ago 
        JSON representation
    
Generate binary files as well as text files with JetBrains MPS.
- Host: GitHub
- URL: https://github.com/iconmaster5326/binarygen
- Owner: iconmaster5326
- License: mit
- Created: 2021-04-06T19:47:58.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2022-05-13T00:06:16.000Z (over 3 years ago)
- Last Synced: 2025-03-28T05:28:15.051Z (7 months ago)
- Topics: binary, jetbrains, jetbrains-mps, mps
- Homepage:
- Size: 188 KB
- Stars: 3
- Watchers: 1
- Forks: 1
- Open Issues: 0
- 
            Metadata Files:
            - Readme: README.md
- License: LICENSE
 
Awesome Lists containing this project
README
          # BinaryGen
[](https://skadi.cloud/open#https://github.com/iconmaster5326/BinaryGen.git)
BinaryGen is a tool for [JetBrains MPS](https://www.jetbrains.com/mps/) to generate binary files as well as text files from your nodes.
# Installing
Check out [the plugin page](https://plugins.jetbrains.com/plugin/16483-binarygen) and install right from your IDE!
# Using
This project defines a new aspect for your languages: `binaryGen`. It's like `textGen`, except this produces binary files instead of text files.

A binary generator consists of a series of fields, which may be numbers, strings, raw sets of bytes, etc
Each field allows you to specify its value via a function in the base language.
There are facilities for repitional and conditional field generation.
You can also define reusable components for generating binary files.
Once you define binary generators for your concepts, the solutions that make use of your language have to use the `BinaryGen.make` language.
Sadly, there's no way I know of to make the binary-generation process configurationless, like how textgen is.
# Implemented Features
* integers of various widths, endianess, and signededness
* strings, byte arrays, etc.
* repitional and conditional constructs
* reusable binary-generation components
# Planned Features
* a more pleasent editing experience
* previewing generated files
* switch-case construct
* if-else construct
* bit-field support
# Special Thanks
* [coolya](https://github.com/coolya) for helping me with bundling the plugin
* The [MPS Slack](https://slack-mps.jetbrains.com/) for general support