Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/evant/sparkle
A compiler for FiM++ written in rust
https://github.com/evant/sparkle
compiler esolang rust
Last synced: 2 months ago
JSON representation
A compiler for FiM++ written in rust
- Host: GitHub
- URL: https://github.com/evant/sparkle
- Owner: evant
- License: apache-2.0
- Created: 2019-11-19T05:41:45.000Z (about 5 years ago)
- Default Branch: mane
- Last Pushed: 2021-12-08T01:35:57.000Z (about 3 years ago)
- Last Synced: 2024-04-16T12:46:43.295Z (9 months ago)
- Topics: compiler, esolang, rust
- Language: Rust
- Homepage:
- Size: 379 KB
- Stars: 5
- Watchers: 4
- Forks: 0
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
# sparkle
A compiler for FiM++ written in rust.
The language mostly follows the [1.0 reference](https://docs.google.com/document/d/1gU-ZROmZu0Xitw_pfC1ktCDvJH5rM85TxxQf5pg_xmg/edit).
You can find notes about differing implementation details in [docs/notes.md](https://github.com/evant/sparkle/blob/master/docs/notes.md).
You can find several sample programs in the [examples](https://github.com/evant/sparkle/tree/master/examples) dir.## Building
Building sparkle requires the rust toolchain. The easiest way to obtain this is with [rustup](https://rustup.rs/).
```
git clone https://github.com/evant/sparkle.git
cd sparkle
cargo build --release
./target/release/sparkle help
./target/release/sparkle gallop examples/hello_equestria.fpp
```## Usage
You may execute a report directly with `sparkle gallop [report]` or compile to an executable with
`sparkle send [report]`.#### Linux/MacOS
```
sparkle send examples/hello_equestria.fpp
./hello_equestria
```#### Windows
You will need to install the Visual Studio [Build Tools](https://visualstudio.microsoft.com/downloads/#build-tools-for-visual-studio-2019)
```
sparkle send examples/hello_equestria.fpp
hello_equestria
```### Cross Compiling
You may cross-compile with `spakle send [report] to [linux|macos|windows]`. This will generate an object file for the
given platform. You will still need to invoke that platform's linker to generate the final executable, but you won't
need sparkle compiled for that platform.#### Linux/MacOS
```
cc hello_equestria.o -o hello_equestria
```#### Windows
```
"C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Auxiliary\Build\vcvarsall.bat" x64
cl hello_equestria.obj ucrt.lib msvcrt.lib
```