{"id":9092,"date":"2020-08-22T14:34:34","date_gmt":"2020-08-22T18:34:34","guid":{"rendered":"https:\/\/irreal.org\/blog\/?p=9092"},"modified":"2020-08-22T14:34:34","modified_gmt":"2020-08-22T18:34:34","slug":"native-emacs-compilation-on-macos","status":"publish","type":"post","link":"https:\/\/irreal.org\/blog\/?p=9092","title":{"rendered":"Native Emacs Compilation on macOS"},"content":{"rendered":"<p>If you\u2019re like me, you\u2019re probably excited about native compilation coming to Emacs. In case you don\u2019t know, the project, <a href=\"http:\/\/akrl.sdf.org\/gccemacs.html\">gccemacs<\/a> (started and headed by Andrea Corallo), brings native compilation to Elisp. That means that not just will Elisp code\u2014and hence Emacs\u2014will run faster but also that some of the C code in Emacs can be replaced with Lisp.<\/p>\n<p>Corallo gave a <a href=\"https:\/\/www.youtube.com\/watch?v=zKHYZOAc_bQ&amp;feature=youtu.be\">presentation<\/a> to the European Lisp Symposium, which I\u2019ve <a href=\"http:\/\/xenodium.com\/trying-out-gccemacs-on-macos\/index.html\">written about before<\/a>, that discusses how things work and gives the results of some benchmarks. The work is ongoing but the system is already usable. As far as I can tell, the plan is to include it in Emacs 28 but if you can\u2019t wait to try it out, the code is in the Emacs git repository.<\/p>\n<p>If you\u2019re on macOS, \u00c1lvaro Ram\u00edrez has step-by-step instructions for compiling Emacs with the native compilation enabled. You\u2019ll need to load gcc with jit support if you don\u2019t already have it. After that, it\u2019s pretty simple. Ram\u00edrez provides a configure script to set everything the way you\u2019ll need it so all you have to do is run the script and call make to build Emacs. See Ram\u00edrez\u2019s post for the details.<\/p>\n<p>This project is a great thing for Emacs and even for making Elisp a more general programming language. I\u2019m already inclined to use Elisp when I can for small utilities and one-offs so improving Elisp is a win for me.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>If you\u2019re like me, you\u2019re probably excited about native compilation coming to Emacs. In case you don\u2019t know, the project, gccemacs (started and headed by Andrea Corallo), brings native compilation to Elisp. That means that not just will Elisp code\u2014and &hellip; <a href=\"https:\/\/irreal.org\/blog\/?p=9092\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5],"tags":[18],"class_list":["post-9092","post","type-post","status-publish","format-standard","hentry","category-general","tag-emacs"],"_links":{"self":[{"href":"https:\/\/irreal.org\/blog\/index.php?rest_route=\/wp\/v2\/posts\/9092","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/irreal.org\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/irreal.org\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/irreal.org\/blog\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/irreal.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=9092"}],"version-history":[{"count":1,"href":"https:\/\/irreal.org\/blog\/index.php?rest_route=\/wp\/v2\/posts\/9092\/revisions"}],"predecessor-version":[{"id":9093,"href":"https:\/\/irreal.org\/blog\/index.php?rest_route=\/wp\/v2\/posts\/9092\/revisions\/9093"}],"wp:attachment":[{"href":"https:\/\/irreal.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=9092"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/irreal.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=9092"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/irreal.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=9092"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}