{"id":21409,"date":"2024-06-25T09:00:26","date_gmt":"2024-06-25T16:00:26","guid":{"rendered":"https:\/\/engineering.fb.com\/?p=21409"},"modified":"2024-06-25T09:09:37","modified_gmt":"2024-06-25T16:09:37","slug":"the-key-to-a-happy-rust-c-relationship","status":"publish","type":"post","link":"https:\/\/engineering.fb.com\/2024\/06\/25\/developer-tools\/the-key-to-a-happy-rust-c-relationship\/","title":{"rendered":"The key to a happy Rust\/C++ relationship"},"content":{"rendered":"<p>The <a href=\"https:\/\/engineering.fb.com\/2021\/04\/29\/developer-tools\/rust\/\" target=\"_blank\" rel=\"noopener\">history of Rust at Meta<\/a> goes all the way back to 2016, when we first started using it for source control. Today, it has been widely embraced at Meta and is one of our <a href=\"https:\/\/engineering.fb.com\/2022\/07\/27\/developer-tools\/programming-languages-endorsed-for-server-side-use-at-meta\/\" target=\"_blank\" rel=\"noopener\">primary supported server-side languages<\/a> (along with C++, Python, and Hack).<\/p>\n<p>But that doesn\u2019t mean there weren\u2019t any growing pains.<\/p>\n<p>Aida G., a member of one of Meta\u2019s first Rust teams, joins Pascal Hartig (<a href=\"https:\/\/www.threads.net\/@passy_\" target=\"_blank\" rel=\"noopener\">@passy<\/a>) on the latest Meta Tech Podcast to dive into the challenges of getting Rust to interact with Meta\u2019s large amount of existing C++ code.<\/p>\n<p>Fortunately, the release of cxx, safe interop between C++, and even async Rust have made things a lot easier.<\/p>\n<p>Download or listen to the episode below:<\/p>\n<p><iframe loading=\"lazy\" style=\"border: none;\" title=\"Libsyn Player\" src=\"\/\/html5-player.libsyn.com\/embed\/episode\/id\/31540077\/height\/90\/theme\/custom\/thumbnail\/yes\/direction\/forward\/render-playlist\/no\/custom-color\/000000\/\" width=\"100%\" height=\"90\" scrolling=\"no\" allowfullscreen=\"allowfullscreen\"><\/iframe><\/p>\n<p>You can also find the episode wherever you get your podcasts, including:<\/p>\n<ul>\n<li><a href=\"https:\/\/podcasts.apple.com\/us\/podcast\/the-key-to-a-happy-rust-c-relationship\/id1370910331?i=1000657333515\" target=\"_blank\" rel=\"noopener\">Apple Podcasts<\/a><\/li>\n<li><a href=\"https:\/\/open.spotify.com\/episode\/1bozfPhbt7YLwgQUzsds6A\" target=\"_blank\" rel=\"noopener\">Spotify<\/a><\/li>\n<li><a href=\"https:\/\/pca.st\/3maf7gvr\" target=\"_blank\" rel=\"noopener\">PocketCasts<\/a><\/li>\n<li><a href=\"https:\/\/overcast.fm\/login\">Overcast<\/a><\/li>\n<\/ul>\n<p>The\u00a0<a href=\"https:\/\/insidefacebookmobile.libsyn.com\/\" target=\"_blank\" rel=\"noopener\">Meta Tech Podcast<\/a>\u00a0is a podcast, brought to you by Meta, where we highlight the work Meta\u2019s engineers are doing at every level \u2013 from low-level frameworks to end-user features.<\/p>\n<p>Send us feedback on\u00a0<a href=\"https:\/\/instagram.com\/metatechpod\" target=\"_blank\" rel=\"noopener\">Instagram<\/a>,\u00a0<a href=\"https:\/\/threads.net\/@metatechpod\" target=\"_blank\" rel=\"noopener\">Threads<\/a>, or\u00a0<a href=\"https:\/\/twitter.com\/metatechpod\" target=\"_blank\" rel=\"noopener\">X<\/a>.<\/p>\n<p>And if you\u2019re interested in learning more about career opportunities at Meta visit the\u00a0<a href=\"https:\/\/www.metacareers.com\/?ref=engineering.fb.com\" target=\"_blank\" rel=\"noopener\">Meta Careers<\/a>\u00a0page.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>The history of Rust at Meta goes all the way back to 2016, when we first started using it for source control. Today, it has been widely embraced at Meta and is one of our primary supported server-side languages (along with C++, Python, and Hack). But that doesn\u2019t mean there weren\u2019t any growing pains. Aida [&#8230;]<\/p>\n<p><a class=\"btn btn-secondary understrap-read-more-link\" href=\"https:\/\/engineering.fb.com\/2024\/06\/25\/developer-tools\/the-key-to-a-happy-rust-c-relationship\/\">Read More&#8230;<\/a><\/p>\n","protected":false},"author":51,"featured_media":21412,"comment_status":"closed","ping_status":"closed","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,"footnotes":""},"categories":[66,174],"tags":[1923],"coauthors":[1924],"class_list":["post-21409","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-developer-tools","category-open-source","tag-meta-tech-podcast","fb_content_type-article"],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v19.3 (Yoast SEO v27.3) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>The key to a happy Rust\/C++ relationship - Engineering at Meta<\/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:\/\/engineering.fb.com\/2024\/06\/25\/developer-tools\/the-key-to-a-happy-rust-c-relationship\/\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Pascal Hartig\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/engineering.fb.com\\\/2024\\\/06\\\/25\\\/developer-tools\\\/the-key-to-a-happy-rust-c-relationship\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/engineering.fb.com\\\/2024\\\/06\\\/25\\\/developer-tools\\\/the-key-to-a-happy-rust-c-relationship\\\/\"},\"author\":{\"@id\":\"https:\\\/\\\/engineering.fb.com\\\/2024\\\/06\\\/25\\\/developer-tools\\\/the-key-to-a-happy-rust-c-relationship\\\/#author\",\"name\":\"\"},\"headline\":\"The key to a happy Rust\\\/C++ relationship\",\"datePublished\":\"2024-06-25T16:00:26+00:00\",\"dateModified\":\"2024-06-25T16:09:37+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/engineering.fb.com\\\/2024\\\/06\\\/25\\\/developer-tools\\\/the-key-to-a-happy-rust-c-relationship\\\/\"},\"wordCount\":204,\"publisher\":{\"@id\":\"https:\\\/\\\/engineering.fb.com\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/engineering.fb.com\\\/2024\\\/06\\\/25\\\/developer-tools\\\/the-key-to-a-happy-rust-c-relationship\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/engineering.fb.com\\\/wp-content\\\/uploads\\\/2024\\\/06\\\/Meta-Tech-Podcast_-C-Rust.png\",\"keywords\":[\"Meta Tech Podcast\"],\"articleSection\":[\"DevInfra\",\"Open Source\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/engineering.fb.com\\\/2024\\\/06\\\/25\\\/developer-tools\\\/the-key-to-a-happy-rust-c-relationship\\\/\",\"url\":\"https:\\\/\\\/engineering.fb.com\\\/2024\\\/06\\\/25\\\/developer-tools\\\/the-key-to-a-happy-rust-c-relationship\\\/\",\"name\":\"The key to a happy Rust\\\/C++ relationship - Engineering at Meta\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/engineering.fb.com\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/engineering.fb.com\\\/2024\\\/06\\\/25\\\/developer-tools\\\/the-key-to-a-happy-rust-c-relationship\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/engineering.fb.com\\\/2024\\\/06\\\/25\\\/developer-tools\\\/the-key-to-a-happy-rust-c-relationship\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/engineering.fb.com\\\/wp-content\\\/uploads\\\/2024\\\/06\\\/Meta-Tech-Podcast_-C-Rust.png\",\"datePublished\":\"2024-06-25T16:00:26+00:00\",\"dateModified\":\"2024-06-25T16:09:37+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/engineering.fb.com\\\/2024\\\/06\\\/25\\\/developer-tools\\\/the-key-to-a-happy-rust-c-relationship\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/engineering.fb.com\\\/2024\\\/06\\\/25\\\/developer-tools\\\/the-key-to-a-happy-rust-c-relationship\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/engineering.fb.com\\\/2024\\\/06\\\/25\\\/developer-tools\\\/the-key-to-a-happy-rust-c-relationship\\\/#primaryimage\",\"url\":\"https:\\\/\\\/engineering.fb.com\\\/wp-content\\\/uploads\\\/2024\\\/06\\\/Meta-Tech-Podcast_-C-Rust.png\",\"contentUrl\":\"https:\\\/\\\/engineering.fb.com\\\/wp-content\\\/uploads\\\/2024\\\/06\\\/Meta-Tech-Podcast_-C-Rust.png\",\"width\":1200,\"height\":630},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/engineering.fb.com\\\/2024\\\/06\\\/25\\\/developer-tools\\\/the-key-to-a-happy-rust-c-relationship\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/engineering.fb.com\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"The key to a happy Rust\\\/C++ relationship\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/engineering.fb.com\\\/#website\",\"url\":\"https:\\\/\\\/engineering.fb.com\\\/\",\"name\":\"Engineering at Meta\",\"description\":\"Engineering at Meta Blog\",\"publisher\":{\"@id\":\"https:\\\/\\\/engineering.fb.com\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/engineering.fb.com\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/engineering.fb.com\\\/#organization\",\"name\":\"Meta\",\"url\":\"https:\\\/\\\/engineering.fb.com\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/engineering.fb.com\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/engineering.fb.com\\\/wp-content\\\/uploads\\\/2023\\\/08\\\/Meta_lockup_positive-primary_RGB.jpg\",\"contentUrl\":\"https:\\\/\\\/engineering.fb.com\\\/wp-content\\\/uploads\\\/2023\\\/08\\\/Meta_lockup_positive-primary_RGB.jpg\",\"width\":29011,\"height\":12501,\"caption\":\"Meta\"},\"image\":{\"@id\":\"https:\\\/\\\/engineering.fb.com\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/Engineering\\\/\",\"https:\\\/\\\/x.com\\\/fb_engineering\"]},[]]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"The key to a happy Rust\/C++ relationship - Engineering at Meta","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:\/\/engineering.fb.com\/2024\/06\/25\/developer-tools\/the-key-to-a-happy-rust-c-relationship\/","twitter_misc":{"Written by":"Pascal Hartig","Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/engineering.fb.com\/2024\/06\/25\/developer-tools\/the-key-to-a-happy-rust-c-relationship\/#article","isPartOf":{"@id":"https:\/\/engineering.fb.com\/2024\/06\/25\/developer-tools\/the-key-to-a-happy-rust-c-relationship\/"},"author":{"@id":"https:\/\/engineering.fb.com\/2024\/06\/25\/developer-tools\/the-key-to-a-happy-rust-c-relationship\/#author","name":""},"headline":"The key to a happy Rust\/C++ relationship","datePublished":"2024-06-25T16:00:26+00:00","dateModified":"2024-06-25T16:09:37+00:00","mainEntityOfPage":{"@id":"https:\/\/engineering.fb.com\/2024\/06\/25\/developer-tools\/the-key-to-a-happy-rust-c-relationship\/"},"wordCount":204,"publisher":{"@id":"https:\/\/engineering.fb.com\/#organization"},"image":{"@id":"https:\/\/engineering.fb.com\/2024\/06\/25\/developer-tools\/the-key-to-a-happy-rust-c-relationship\/#primaryimage"},"thumbnailUrl":"https:\/\/engineering.fb.com\/wp-content\/uploads\/2024\/06\/Meta-Tech-Podcast_-C-Rust.png","keywords":["Meta Tech Podcast"],"articleSection":["DevInfra","Open Source"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/engineering.fb.com\/2024\/06\/25\/developer-tools\/the-key-to-a-happy-rust-c-relationship\/","url":"https:\/\/engineering.fb.com\/2024\/06\/25\/developer-tools\/the-key-to-a-happy-rust-c-relationship\/","name":"The key to a happy Rust\/C++ relationship - Engineering at Meta","isPartOf":{"@id":"https:\/\/engineering.fb.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/engineering.fb.com\/2024\/06\/25\/developer-tools\/the-key-to-a-happy-rust-c-relationship\/#primaryimage"},"image":{"@id":"https:\/\/engineering.fb.com\/2024\/06\/25\/developer-tools\/the-key-to-a-happy-rust-c-relationship\/#primaryimage"},"thumbnailUrl":"https:\/\/engineering.fb.com\/wp-content\/uploads\/2024\/06\/Meta-Tech-Podcast_-C-Rust.png","datePublished":"2024-06-25T16:00:26+00:00","dateModified":"2024-06-25T16:09:37+00:00","breadcrumb":{"@id":"https:\/\/engineering.fb.com\/2024\/06\/25\/developer-tools\/the-key-to-a-happy-rust-c-relationship\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/engineering.fb.com\/2024\/06\/25\/developer-tools\/the-key-to-a-happy-rust-c-relationship\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/engineering.fb.com\/2024\/06\/25\/developer-tools\/the-key-to-a-happy-rust-c-relationship\/#primaryimage","url":"https:\/\/engineering.fb.com\/wp-content\/uploads\/2024\/06\/Meta-Tech-Podcast_-C-Rust.png","contentUrl":"https:\/\/engineering.fb.com\/wp-content\/uploads\/2024\/06\/Meta-Tech-Podcast_-C-Rust.png","width":1200,"height":630},{"@type":"BreadcrumbList","@id":"https:\/\/engineering.fb.com\/2024\/06\/25\/developer-tools\/the-key-to-a-happy-rust-c-relationship\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/engineering.fb.com\/"},{"@type":"ListItem","position":2,"name":"The key to a happy Rust\/C++ relationship"}]},{"@type":"WebSite","@id":"https:\/\/engineering.fb.com\/#website","url":"https:\/\/engineering.fb.com\/","name":"Engineering at Meta","description":"Engineering at Meta Blog","publisher":{"@id":"https:\/\/engineering.fb.com\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/engineering.fb.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/engineering.fb.com\/#organization","name":"Meta","url":"https:\/\/engineering.fb.com\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/engineering.fb.com\/#\/schema\/logo\/image\/","url":"https:\/\/engineering.fb.com\/wp-content\/uploads\/2023\/08\/Meta_lockup_positive-primary_RGB.jpg","contentUrl":"https:\/\/engineering.fb.com\/wp-content\/uploads\/2023\/08\/Meta_lockup_positive-primary_RGB.jpg","width":29011,"height":12501,"caption":"Meta"},"image":{"@id":"https:\/\/engineering.fb.com\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/Engineering\/","https:\/\/x.com\/fb_engineering"]},[]]}},"jetpack_featured_media_url":"https:\/\/engineering.fb.com\/wp-content\/uploads\/2024\/06\/Meta-Tech-Podcast_-C-Rust.png","jetpack_shortlink":"https:\/\/wp.me\/pa0Lhq-5zj","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/engineering.fb.com\/wp-json\/wp\/v2\/posts\/21409","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/engineering.fb.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/engineering.fb.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/engineering.fb.com\/wp-json\/wp\/v2\/users\/51"}],"replies":[{"embeddable":true,"href":"https:\/\/engineering.fb.com\/wp-json\/wp\/v2\/comments?post=21409"}],"version-history":[{"count":4,"href":"https:\/\/engineering.fb.com\/wp-json\/wp\/v2\/posts\/21409\/revisions"}],"predecessor-version":[{"id":21415,"href":"https:\/\/engineering.fb.com\/wp-json\/wp\/v2\/posts\/21409\/revisions\/21415"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/engineering.fb.com\/wp-json\/wp\/v2\/media\/21412"}],"wp:attachment":[{"href":"https:\/\/engineering.fb.com\/wp-json\/wp\/v2\/media?parent=21409"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/engineering.fb.com\/wp-json\/wp\/v2\/categories?post=21409"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/engineering.fb.com\/wp-json\/wp\/v2\/tags?post=21409"},{"taxonomy":"author","embeddable":true,"href":"https:\/\/engineering.fb.com\/wp-json\/wp\/v2\/coauthors?post=21409"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}