It allows for interacting with .Net code like this:
(named-readtables:in-readtable bike:bike-syntax)
(defun hello ()
[:System.Console WriteLine "Hello, World!"])
It does also support callbacks:
(use-package :bike)
(named-readtables:in-readtable bike-syntax)
(import-assembly 'System.Runtime.InteropServices.RuntimeInformation)
(use-namespace 'System)
(use-namespace 'System.Runtime.InteropServices)
(defun hello ()
(let* ((os [:RuntimeInformation %OSDescription])
(delegate (new '(Action :string)
(lambda (who)
(format t "Hello ~a!~%You are running .Net Core~% inside ~a ~a~% on ~a"
who
(lisp-implementation-type)
(lisp-implementation-version)
os))))
(user [:Environment %UserName]))
[delegate Invoke user]))
(hello)
;; ==>
;; Hello lovesan!
;; You are running .Net Core
;; inside SBCL 1.5.3
;; on Linux 4.15.0-1041-aws #43-Ubuntu SMP Thu Jun 6 13:39:11 UTC 2019
It is installable via quicklisp:
(ql:quickload :bike)
Note that to build the library you should have .Net Core SDK installed.
Github page: https://github.com/Lovesan/bike/
License: MIT
FFI