Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Question : C++ classes? #29

interstar opened this issue May 17, 2019 · 2 comments


Copy link

commented May 17, 2019

I'm really interested in the possibility of writing libraries in Clojure / Ferret that can be called from a C++ framework.

Something like gen-class in Clojure.

Is this possible? Is it part of the goal for Ferret?


This comment has been minimized.

Copy link

commented May 18, 2019

It is possible to call Ferret from C++. Embeddability is a primary goal of Ferret.

;; core.clj
(defn say-hi
   (println "Hello"))
   (println "Hello" n)))

Compile it. ferret core.clj. You can load core.cpp from C++.


#include "core.cpp"

int main(){
  using namespace ferret;

  run(core::say_hi(), obj<string>("Dave"));

  return 0;

@nakkaya nakkaya closed this May 18, 2019


This comment has been minimized.

Copy link

commented May 19, 2019


That looks great :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
2 participants
You can’t perform that action at this time.