From 212c575dafec61aae3e776846aa32c4f7c825f0d Mon Sep 17 00:00:00 2001 From: Jean Privat Date: Thu, 23 Nov 2017 15:45:09 -0500 Subject: [PATCH 1/1] nitin: add FFI example in the README Signed-off-by: Jean Privat --- contrib/nitin/README.md | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/contrib/nitin/README.md b/contrib/nitin/README.md index e01369f..9b9648c 100644 --- a/contrib/nitin/README.md +++ b/contrib/nitin/README.md @@ -13,10 +13,10 @@ This tool is outside src/ because: * maintain an interpreter and live objects (the model grows but the interpreter and runtime data are reused) * runtime errors/aborts return to the interactive loop * top-level variables are preserved but are only visible at the top level +* Basic FFI -Main missing features +Main missing feature -* FFI is strange * No model/object inspection ## Examples @@ -171,3 +171,15 @@ A:bar -->print([0..10[.to_a.to_json) [0,1,2,3,4,5,6,7,8,9] ~~~ + +### FFI + +The FFI is handled as with the non-interactive interpreter. + +~~~raw +-->fun hello `{ +...puts("Hello, world"); +...`} +-->hello +Hello, world +~~~ -- 1.7.9.5