Skip to content

mcquenji/dscript

Repository files navigation

Dscript Dscript

pub package

A lightweight Domain-Specific Language (DSL) for Dart designed to simplify writing and integrating plugins/extensions into Flutter and Dart applications. It offers strong interop between DSL constructs and Dart code, a static permission system, and a contract-based plugin model.


Getting Started

Define a script:

author "You";
version 0.1.0;
name "Example";

description "demo";

contract Demo {
  impl greet(string who) -> void {
    log::info("Hello " + who);
  }
}

Register the contract in your host app:

final demo = contract('Demo')
  .impl('greet', returnType: PrimitiveType.VOID)
  .param('who', PrimitiveType.STRING)
  .describe("Greets someone")
  .end()
  .build();

For full documentation see the docs.

Contributing

Please read CONTRIBUTING.md for development instructions.


License

This project is licensed under the MIT License.

About

Scripting language for flutter/dart plugins & extensions

Resources

License

Contributing

Stars

Watchers

Forks

Sponsor this project

 

Contributors 3

  •  
  •  
  •