2 releases
0.2.1 | Jul 9, 2019 |
---|---|
0.2.0 | Jul 9, 2019 |
#101 in #dsl
Used in s-crap
68KB
2K
SLoC
Scdlang
Statecharts Description Language
🚧Status: 🗶perimental 4ever🤞
About
Scdlang (pronounced /ˈesˌsi:ˈdi:ˈlæŋ/
) is a description language for describing Statecharts that later can be used to generate code or just transpile it into another format. This project is more focus on how to describe Statecharts universally that can be used in another language/platform rather than drawing a Statecharts diagram. For drawing, see State Machine Cat.
Philosophy
- Readable just like you read then visualize a state diagram
- Writeable just like you write code which is concise, clear, and can be refactored
- Transferable to any implementation (e.g platform, programming language, runtime, etc)
Features and Wishlist
- CLI utils (see usage)
- Syntax is inspired from various drawing languages like mermaid, Graphviz, PlantUML, and many more
- Decent error message
- Avoid invalid and ambigous transition via semantics analysis
- Rule definition for static analysis and formal verification
- Transpile into other formats:
- Compile into other formats (need this to make it being an embeddable DSL):
- WebAssembly (using parity-wasm)
- LLVM IR 🤔 (open the possibility to be compiled as wasm, dynlib, and static lib)
- Code generation 🤔 (not sure if I need this but why not?)
- Julia via
@generated
implemented as parametric multiple-dispatch functors - Rust via
#[proc_macro_attribute]
implemented as typestate programming? (I'm still afraid if it will conflict with another crates) - Elixir via
use
macro which desugar into gen_statem 💪 - Flutter via
builder_factories
(waiting for the FFI to be stable)
- Julia via
For more info, see the changelog in the release page
Getting Started
Currently, this project only have the binary CLI for each OS. Please go to the release page to download then extract it. It also shipped with auto-completions script for your preffered shell.
Installing
Just download the binary in the release page or follow this instructions 👇
Linux🐧
TODO: (AUR, DEB, RPM) or via shellscript just like installing rustup
MacOS🍏
TODO: brew or via shellscript just like installing rustup
Windows🗔
TODO: chocolatey or via msi installer just like installing rustup
using Docker🐳
smcat, dot, and graph-easy are pre-installed in this docker image
docker pull scdlang/scrap
via Cargo📦
cargo install s-crap
Contributing
Any contributions are welcome as long as it follow Code of Conduct.
If anyone have questions or something to discuss, feel free to DM or mention me in any platform that have my profile picture 👹.
License
This project is licensed under the Universal Permissive License 1.0 - see the LICENSE file for more detail.
Resources
Dependencies
~3–4MB
~84K SLoC