

{"id":13039,"date":"2021-04-24T13:34:58","date_gmt":"2021-04-24T18:34:58","guid":{"rendered":"https:\/\/rud.is\/b\/?p=13039"},"modified":"2021-04-24T13:36:15","modified_gmt":"2021-04-24T18:36:15","slug":"making-macos-universal-apps-with-universal-golang-static-libraries","status":"publish","type":"post","link":"https:\/\/rud.is\/b\/2021\/04\/24\/making-macos-universal-apps-with-universal-golang-static-libraries\/","title":{"rendered":"Making macOS Universal Apps in Swift with Universal Golang Static Libraries"},"content":{"rendered":"<p>There are a plethora of amazingly useful Golang libraries, and it has been possible for quite some time to use Go libraries with Swift. The advent of the release of the new Apple Silicon\/M1\/arm64 architecture for macOS created the need for a new round of &#8220;fat&#8221;\/&#8221;universal&#8221; binaries and libraries to bridge the gap between legacy Intel Macs and the new breed of Macs.<\/p>\n<p>I didn&#8217;t see an &#8220;all-in-one-place&#8221; snippet for how to build cross-platform + fat\/universal Golang static libraries and then use them in Swift to make a fat\/universal macOS binary, and it is likely I&#8217;m not the only one who wished this existed, so here&#8217;s a snippet that takes the static HTML library example from <a href=\"https:\/\/youngdynasty.net\/posts\/writing-mac-apps-in-go\/\">Young Dynasty<\/a> and shows how to prepare the static library for use in Swift, then how to build a Swift universal binary. This is a command line app and we&#8217;re building everything without the Xcode editor to keep it concise and straightforward.<\/p>\n<p>The rest of the explanatory text is in the comments in the code block.<\/p>\n<pre><code class=\"language-bash\"># make a space to play in\nmkdir universal-static-test\ncd universal-static-test\n\n# libhtmlscraper via: https:\/\/youngdynasty.net\/posts\/writing-mac-apps-in-go\/\n# make the small HTML escaper library Golang source\ncat &gt; main.go &lt;&lt; EOF\npackage main\n\nimport (\n  \"C\"\n  \"html\"\n)\n\n\/\/export escape_html\nfunc escape_html(input *C.char) *C.char {\n  s := html.EscapeString(C.GoString(input))\n  return C.CString(s)\n}\n\n\/\/export unescape_html\nfunc unescape_html(input *C.char) *C.char {\n  s := html.UnescapeString(C.GoString(input))\n  return C.CString(s)\n}\n\n\/\/ We need an entry point; it's ok for this to be empty\nfunc main() {}\nEOF\n\n# build the Go library for ARM\nCGO_ENABLED=1 GOOS=darwin GOARCH=arm64 go build --buildmode=c-archive -o libhtmlescaper-arm64.a\n\n# build the Go library for AMD\nCGO_ENABLED=1 GOOS=darwin GOARCH=amd64 go build --buildmode=c-archive -o libhtmlescaper-amd64.a\n\n# Make a universal static archive\nlipo -create libhtmlescaper-arm64.a libhtmlescaper-amd64.a -o libhtmlescaper.a\n\n# we don't need this anymore\nrm libhtmlescaper-amd64.h\n\n# this is a better name\nmv libhtmlescaper-arm64.h libhtmlescaper.h\n\n# make the objective-c bridging header so we can use the library in Swift\ncat &gt; bridge.h &lt;&lt;EOF\n#include \"libhtmlescaler.h\"\nEOF\n\n# creaate a lame\/super basic test swift file that uses the Go library\ncat &gt; main.swift &lt;&lt;EOF\nprint(String(cString: escape_html(strdup(\"&lt;b&gt;bold&lt;\/b&gt;\"))))\nEOF\n\n# make the swift executatble for amd64\nswiftc -target x86_64-apple-macos11.0 -import-objc-header bridge.h main.swift libhtmlescaper.a -o main-amd64\n\n# make the swift executatble for arm64\nswiftc -target arm64-apple-macos11.0 -import-objc-header bridge.h main.swift libhtmlescaper.a -o main-arm64 \n\n# Make a universal binary\nlipo -create main-amd64 main-arm64 -o main\n\n# Make sure it's universal\nfile main\n## main: Mach-O universal binary with 2 architectures: [x86_64:Mach-O 64-bit executable x86_64] [arm64]\n## main (for architecture x86_64): Mach-O 64-bit executable x86_64\n## main (for architecture arm64):  Mach-O 64-bit executable arm64\n\n# try it out\n.\/main.swift\n## \"&lt;b&gt;bold&lt;\/b&gt;\"\n<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>There are a plethora of amazingly useful Golang libraries, and it has been possible for quite some time to use Go libraries with Swift. The advent of the release of the new Apple Silicon\/M1\/arm64 architecture for macOS created the need for a new round of &#8220;fat&#8221;\/&#8221;universal&#8221; binaries and libraries to bridge the gap between legacy [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"activitypub_content_warning":"","activitypub_content_visibility":"","activitypub_max_image_attachments":3,"activitypub_interaction_policy_quote":"anyone","activitypub_status":"","footnotes":""},"categories":[840,841,780,830],"tags":[],"class_list":["post-13039","post","type-post","status-publish","format-standard","hentry","category-go","category-golang","category-macos","category-swift"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.3 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Making macOS Universal Apps in Swift with Universal Golang Static Libraries - rud.is<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/rud.is\/b\/2021\/04\/24\/making-macos-universal-apps-with-universal-golang-static-libraries\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Making macOS Universal Apps in Swift with Universal Golang Static Libraries - rud.is\" \/>\n<meta property=\"og:description\" content=\"There are a plethora of amazingly useful Golang libraries, and it has been possible for quite some time to use Go libraries with Swift. The advent of the release of the new Apple Silicon\/M1\/arm64 architecture for macOS created the need for a new round of &#8220;fat&#8221;\/&#8221;universal&#8221; binaries and libraries to bridge the gap between legacy [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/rud.is\/b\/2021\/04\/24\/making-macos-universal-apps-with-universal-golang-static-libraries\/\" \/>\n<meta property=\"og:site_name\" content=\"rud.is\" \/>\n<meta property=\"article:published_time\" content=\"2021-04-24T18:34:58+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2021-04-24T18:36:15+00:00\" \/>\n<meta name=\"author\" content=\"hrbrmstr\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"hrbrmstr\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/rud.is\\\/b\\\/2021\\\/04\\\/24\\\/making-macos-universal-apps-with-universal-golang-static-libraries\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/rud.is\\\/b\\\/2021\\\/04\\\/24\\\/making-macos-universal-apps-with-universal-golang-static-libraries\\\/\"},\"author\":{\"name\":\"hrbrmstr\",\"@id\":\"https:\\\/\\\/rud.is\\\/b\\\/#\\\/schema\\\/person\\\/d7cb7487ab0527447f7fda5c423ff886\"},\"headline\":\"Making macOS Universal Apps in Swift with Universal Golang Static Libraries\",\"datePublished\":\"2021-04-24T18:34:58+00:00\",\"dateModified\":\"2021-04-24T18:36:15+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/rud.is\\\/b\\\/2021\\\/04\\\/24\\\/making-macos-universal-apps-with-universal-golang-static-libraries\\\/\"},\"wordCount\":191,\"commentCount\":1,\"publisher\":{\"@id\":\"https:\\\/\\\/rud.is\\\/b\\\/#\\\/schema\\\/person\\\/d7cb7487ab0527447f7fda5c423ff886\"},\"articleSection\":[\"Go\",\"Golang\",\"macOS\",\"Swift\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/rud.is\\\/b\\\/2021\\\/04\\\/24\\\/making-macos-universal-apps-with-universal-golang-static-libraries\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/rud.is\\\/b\\\/2021\\\/04\\\/24\\\/making-macos-universal-apps-with-universal-golang-static-libraries\\\/\",\"url\":\"https:\\\/\\\/rud.is\\\/b\\\/2021\\\/04\\\/24\\\/making-macos-universal-apps-with-universal-golang-static-libraries\\\/\",\"name\":\"Making macOS Universal Apps in Swift with Universal Golang Static Libraries - rud.is\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/rud.is\\\/b\\\/#website\"},\"datePublished\":\"2021-04-24T18:34:58+00:00\",\"dateModified\":\"2021-04-24T18:36:15+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/rud.is\\\/b\\\/2021\\\/04\\\/24\\\/making-macos-universal-apps-with-universal-golang-static-libraries\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/rud.is\\\/b\\\/2021\\\/04\\\/24\\\/making-macos-universal-apps-with-universal-golang-static-libraries\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/rud.is\\\/b\\\/2021\\\/04\\\/24\\\/making-macos-universal-apps-with-universal-golang-static-libraries\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/rud.is\\\/b\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Making macOS Universal Apps in Swift with Universal Golang Static Libraries\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/rud.is\\\/b\\\/#website\",\"url\":\"https:\\\/\\\/rud.is\\\/b\\\/\",\"name\":\"rud.is\",\"description\":\"&quot;In God we trust. All others must bring data&quot;\",\"publisher\":{\"@id\":\"https:\\\/\\\/rud.is\\\/b\\\/#\\\/schema\\\/person\\\/d7cb7487ab0527447f7fda5c423ff886\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/rud.is\\\/b\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\\\/\\\/rud.is\\\/b\\\/#\\\/schema\\\/person\\\/d7cb7487ab0527447f7fda5c423ff886\",\"name\":\"hrbrmstr\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/i0.wp.com\\\/rud.is\\\/b\\\/wp-content\\\/uploads\\\/2023\\\/10\\\/ukr-shield.png?fit=460%2C460&ssl=1\",\"url\":\"https:\\\/\\\/i0.wp.com\\\/rud.is\\\/b\\\/wp-content\\\/uploads\\\/2023\\\/10\\\/ukr-shield.png?fit=460%2C460&ssl=1\",\"contentUrl\":\"https:\\\/\\\/i0.wp.com\\\/rud.is\\\/b\\\/wp-content\\\/uploads\\\/2023\\\/10\\\/ukr-shield.png?fit=460%2C460&ssl=1\",\"width\":460,\"height\":460,\"caption\":\"hrbrmstr\"},\"logo\":{\"@id\":\"https:\\\/\\\/i0.wp.com\\\/rud.is\\\/b\\\/wp-content\\\/uploads\\\/2023\\\/10\\\/ukr-shield.png?fit=460%2C460&ssl=1\"},\"description\":\"Don't look at me\u2026I do what he does \u2014 just slower. #rstats avuncular \u2022 ?Resistance Fighter \u2022 Cook \u2022 Christian \u2022 [Master] Chef des Donn\u00e9es de S\u00e9curit\u00e9 @ @rapid7\",\"sameAs\":[\"http:\\\/\\\/rud.is\"],\"url\":\"https:\\\/\\\/rud.is\\\/b\\\/author\\\/hrbrmstr\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Making macOS Universal Apps in Swift with Universal Golang Static Libraries - rud.is","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/rud.is\/b\/2021\/04\/24\/making-macos-universal-apps-with-universal-golang-static-libraries\/","og_locale":"en_US","og_type":"article","og_title":"Making macOS Universal Apps in Swift with Universal Golang Static Libraries - rud.is","og_description":"There are a plethora of amazingly useful Golang libraries, and it has been possible for quite some time to use Go libraries with Swift. The advent of the release of the new Apple Silicon\/M1\/arm64 architecture for macOS created the need for a new round of &#8220;fat&#8221;\/&#8221;universal&#8221; binaries and libraries to bridge the gap between legacy [&hellip;]","og_url":"https:\/\/rud.is\/b\/2021\/04\/24\/making-macos-universal-apps-with-universal-golang-static-libraries\/","og_site_name":"rud.is","article_published_time":"2021-04-24T18:34:58+00:00","article_modified_time":"2021-04-24T18:36:15+00:00","author":"hrbrmstr","twitter_card":"summary_large_image","twitter_misc":{"Written by":"hrbrmstr","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/rud.is\/b\/2021\/04\/24\/making-macos-universal-apps-with-universal-golang-static-libraries\/#article","isPartOf":{"@id":"https:\/\/rud.is\/b\/2021\/04\/24\/making-macos-universal-apps-with-universal-golang-static-libraries\/"},"author":{"name":"hrbrmstr","@id":"https:\/\/rud.is\/b\/#\/schema\/person\/d7cb7487ab0527447f7fda5c423ff886"},"headline":"Making macOS Universal Apps in Swift with Universal Golang Static Libraries","datePublished":"2021-04-24T18:34:58+00:00","dateModified":"2021-04-24T18:36:15+00:00","mainEntityOfPage":{"@id":"https:\/\/rud.is\/b\/2021\/04\/24\/making-macos-universal-apps-with-universal-golang-static-libraries\/"},"wordCount":191,"commentCount":1,"publisher":{"@id":"https:\/\/rud.is\/b\/#\/schema\/person\/d7cb7487ab0527447f7fda5c423ff886"},"articleSection":["Go","Golang","macOS","Swift"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/rud.is\/b\/2021\/04\/24\/making-macos-universal-apps-with-universal-golang-static-libraries\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/rud.is\/b\/2021\/04\/24\/making-macos-universal-apps-with-universal-golang-static-libraries\/","url":"https:\/\/rud.is\/b\/2021\/04\/24\/making-macos-universal-apps-with-universal-golang-static-libraries\/","name":"Making macOS Universal Apps in Swift with Universal Golang Static Libraries - rud.is","isPartOf":{"@id":"https:\/\/rud.is\/b\/#website"},"datePublished":"2021-04-24T18:34:58+00:00","dateModified":"2021-04-24T18:36:15+00:00","breadcrumb":{"@id":"https:\/\/rud.is\/b\/2021\/04\/24\/making-macos-universal-apps-with-universal-golang-static-libraries\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/rud.is\/b\/2021\/04\/24\/making-macos-universal-apps-with-universal-golang-static-libraries\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/rud.is\/b\/2021\/04\/24\/making-macos-universal-apps-with-universal-golang-static-libraries\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/rud.is\/b\/"},{"@type":"ListItem","position":2,"name":"Making macOS Universal Apps in Swift with Universal Golang Static Libraries"}]},{"@type":"WebSite","@id":"https:\/\/rud.is\/b\/#website","url":"https:\/\/rud.is\/b\/","name":"rud.is","description":"&quot;In God we trust. All others must bring data&quot;","publisher":{"@id":"https:\/\/rud.is\/b\/#\/schema\/person\/d7cb7487ab0527447f7fda5c423ff886"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/rud.is\/b\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":["Person","Organization"],"@id":"https:\/\/rud.is\/b\/#\/schema\/person\/d7cb7487ab0527447f7fda5c423ff886","name":"hrbrmstr","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2023\/10\/ukr-shield.png?fit=460%2C460&ssl=1","url":"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2023\/10\/ukr-shield.png?fit=460%2C460&ssl=1","contentUrl":"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2023\/10\/ukr-shield.png?fit=460%2C460&ssl=1","width":460,"height":460,"caption":"hrbrmstr"},"logo":{"@id":"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2023\/10\/ukr-shield.png?fit=460%2C460&ssl=1"},"description":"Don't look at me\u2026I do what he does \u2014 just slower. #rstats avuncular \u2022 ?Resistance Fighter \u2022 Cook \u2022 Christian \u2022 [Master] Chef des Donn\u00e9es de S\u00e9curit\u00e9 @ @rapid7","sameAs":["http:\/\/rud.is"],"url":"https:\/\/rud.is\/b\/author\/hrbrmstr\/"}]}},"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/p23idr-3oj","jetpack_likes_enabled":true,"jetpack-related-posts":[{"id":13317,"url":"https:\/\/rud.is\/b\/2022\/01\/28\/a-weatherflow-tempest-udp-broadcast-receiver-in-golang-rust-swift-and-c\/","url_meta":{"origin":13039,"position":0},"title":"A WeatherFlow Tempest UDP Broadcast Receiver in Golang, Rust, Swift, and C++","author":"hrbrmstr","date":"2022-01-28","format":false,"excerpt":"After a Twitter convo about weather stations I picked up a WeatherFlow Tempest. Setup was quick, but the sensor package died within 24 hours. I was going to give up on it but I had written an R package (for the REST API & UDP broadcast interfaces) and C++ utility\u2026","rel":"","context":"In &quot;C++&quot;","block_context":{"text":"C++","link":"https:\/\/rud.is\/b\/category\/c\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":14475,"url":"https:\/\/rud.is\/b\/2023\/09\/30\/avoid-libwebp-electron-woes-on-macos-with-positron\/","url_meta":{"origin":13039,"position":1},"title":"Avoid libwebp Electron Woes On macOS With positron","author":"hrbrmstr","date":"2023-09-30","format":false,"excerpt":"If you've got ? on this blog (directly, or via syndication) you'd have to have been living under a rock to not know about the libwebp supply chain disaster. An unfortunate casualty of inept programming just happened to be any app in the Electron ecosystem that doesn't undergo bleeding-edge updates.\u2026","rel":"","context":"In &quot;Cybersecurity&quot;","block_context":{"text":"Cybersecurity","link":"https:\/\/rud.is\/b\/category\/cybersecurity\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2023\/09\/resource-database-Ix86EQm6HDQ-unsplash.jpg?fit=960%2C1200&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2023\/09\/resource-database-Ix86EQm6HDQ-unsplash.jpg?fit=960%2C1200&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2023\/09\/resource-database-Ix86EQm6HDQ-unsplash.jpg?fit=960%2C1200&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2023\/09\/resource-database-Ix86EQm6HDQ-unsplash.jpg?fit=960%2C1200&ssl=1&resize=700%2C400 2x"},"classes":[]},{"id":13498,"url":"https:\/\/rud.is\/b\/2022\/07\/10\/rust-cli-for-apples-weatherkit-rest-api\/","url_meta":{"origin":13039,"position":2},"title":"Rust CLI For Apple&#8217;s WeatherKit REST API","author":"hrbrmstr","date":"2022-07-10","format":false,"excerpt":"Apple is in the final stages of shuttering the DarkSky service\/API. They've replaced it with WeatherKit, which has both an xOS framework version as well as a REST API. To use either, you need to be a member of the Apple Developer Program (ADP) \u2014 $99.00\/USD per-year \u2014 and calls\u2026","rel":"","context":"In &quot;Apple&quot;","block_context":{"text":"Apple","link":"https:\/\/rud.is\/b\/category\/apple\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":12891,"url":"https:\/\/rud.is\/b\/2021\/01\/23\/swiftr-switcheroo-calling-compiled-swift-from-r\/","url_meta":{"origin":13039,"position":3},"title":"SwiftR Switcheroo: Calling [Compiled] Swift from R!","author":"hrbrmstr","date":"2021-01-23","format":false,"excerpt":"I've been on a Swift + R bender for a while now, but have been envious of the pure macOS\/iOS (et al) folks who get to use Apple's seriously ++good machine learning libraries, which are even more robust on the new M1 hardware (it's cool having hardware components dedicated to\u2026","rel":"","context":"In &quot;macOS&quot;","block_context":{"text":"macOS","link":"https:\/\/rud.is\/b\/category\/macos\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":12438,"url":"https:\/\/rud.is\/b\/2019\/08\/22\/quick-hit-a-new-64-bit-swift-5-rswitch-app\/","url_meta":{"origin":13039,"position":4},"title":"Quick Hit: A new 64-bit Swift 5 RSwitch App","author":"hrbrmstr","date":"2019-08-22","format":false,"excerpt":"At the bottom of the R for macOS Developer's Page there's mention of an \"other binary\" called \"RSwitch\" that is \"a small GUI that allows you to switch between R versions quickly (if you have multiple versions of R framework installed).\" Said switching requires you to use the \"tar.gz\" versions\u2026","rel":"","context":"In &quot;Apple&quot;","block_context":{"text":"Apple","link":"https:\/\/rud.is\/b\/category\/apple\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":12866,"url":"https:\/\/rud.is\/b\/2021\/01\/04\/bringing-r-to-swift-on-macos\/","url_meta":{"origin":13039,"position":5},"title":"Bringing R to Swift on macOS","author":"hrbrmstr","date":"2021-01-04","format":false,"excerpt":"Over Christmas break I teased some screencaps: A more refined #rstats #swift \"SwiftR\" example. Simple Image view + some text views, a color picker and a button that runs R-in-Swift code (like {reticulate} does for Python in R)Note no ssd\/hd storage round-trip for the plot.Code snippet: https:\/\/t.co\/fWaHnztUgd pic.twitter.com\/y5m1I16tCB\u2014 Caliban's War\u2026","rel":"","context":"In &quot;Apple&quot;","block_context":{"text":"Apple","link":"https:\/\/rud.is\/b\/category\/apple\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]}],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/rud.is\/b\/wp-json\/wp\/v2\/posts\/13039","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/rud.is\/b\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/rud.is\/b\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/rud.is\/b\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/rud.is\/b\/wp-json\/wp\/v2\/comments?post=13039"}],"version-history":[{"count":0,"href":"https:\/\/rud.is\/b\/wp-json\/wp\/v2\/posts\/13039\/revisions"}],"wp:attachment":[{"href":"https:\/\/rud.is\/b\/wp-json\/wp\/v2\/media?parent=13039"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/rud.is\/b\/wp-json\/wp\/v2\/categories?post=13039"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/rud.is\/b\/wp-json\/wp\/v2\/tags?post=13039"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}