From a77fa65f9c832fc5c67c4cd92bbbe4b33ca78158 Mon Sep 17 00:00:00 2001 From: Denis Merigoux Date: Tue, 9 Aug 2022 15:00:13 +0200 Subject: [PATCH] Documentation about plugins --- README.md | 7 +++++++ compiler/plugins/README.md | 11 +++++++++++ 2 files changed, 18 insertions(+) create mode 100644 compiler/plugins/README.md diff --git a/README.md b/README.md index 8a45bdb4..ff5dc144 100644 --- a/README.md +++ b/README.md @@ -127,6 +127,13 @@ them, use make help +### Plugin backends + +While the compiler has some builtin backends for Catala (Python, Ocaml, etc.), +it is also possible to add a custom backend to the Catala compiler without +having to modify its source code. This plugin solution relies on dynamic +linking: see [the dedicated README](compiler/plugins/README.md). + ### Clerk Use `clerk --help` if you have installed it to get more information about the command line diff --git a/compiler/plugins/README.md b/compiler/plugins/README.md new file mode 100644 index 00000000..25caeb45 --- /dev/null +++ b/compiler/plugins/README.md @@ -0,0 +1,11 @@ +# Catala compiler plugins + +You want to add a customized backend for the Catala compiler but don't +want to modify its source code? Thanks to dynamic linking, it is possible +to do so. The advantage of creating a customized backend is the possibility +to craft a generated target code that perfectly matches the naming conventions, +module structure or coding style of your application. + +See the [online documentation](https://catala-lang.org/ocaml_docs/catala/plugins.html) +for more details on how to create them, or look at the existing plugins +in this directory for inspiration.