{"payload":{"feedbackUrl":"https://github.com/orgs/community/discussions/53140","repo":{"id":823705018,"defaultBranch":"master","name":"workerd-cxx","ownerLogin":"cloudflare","currentUserCanPush":false,"isFork":true,"isEmpty":false,"createdAt":"2024-07-03T14:44:17.000Z","ownerAvatar":"https://avatars.githubusercontent.com/u/314135?v=4","public":true,"private":false,"isOrgOwned":true},"refInfo":{"name":"","listCacheKey":"v0:1726588719.0","currentOid":""},"activityList":{"items":[{"before":"d08f7cf193278ec0fb55a05a10e2bb0819b815d5","after":"c52ee161a63a182de6ecda9ddea5031b6c994965","ref":"refs/heads/maizatskyi/2024-09-16-throw-hook","pushedAt":"2024-09-17T18:09:31.000Z","pushType":"force_push","commitsCount":0,"pusher":{"login":"mikea","name":"Mike Aizatsky","path":"/mikea","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/3236?s=80&v=4"},"commit":{"message":"rust error callback\n\nRather then throw things directly, introduce a global callback.\nWe will override the callback in workerd to integrate with\nkj::Exception","shortMessageHtmlLink":"rust error callback"}},{"before":"1d5a8e1bd41b171eb98d07fc0b41efd610e10d1e","after":"25cbcf87fa98a22977d3cd53602e703d7046e58c","ref":"refs/heads/master","pushedAt":"2024-09-17T18:04:16.000Z","pushType":"push","commitsCount":1,"pusher":{"login":"mikea","name":"Mike Aizatsky","path":"/mikea","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/3236?s=80&v=4"},"commit":{"message":"Update ci.yml","shortMessageHtmlLink":"Update ci.yml"}},{"before":"b0e7d4fd9f4302b84a3066c47efc9cc9f71ca255","after":"1d5a8e1bd41b171eb98d07fc0b41efd610e10d1e","ref":"refs/heads/master","pushedAt":"2024-09-17T18:03:34.000Z","pushType":"push","commitsCount":1,"pusher":{"login":"mikea","name":"Mike Aizatsky","path":"/mikea","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/3236?s=80&v=4"},"commit":{"message":"Rename site.yml to site._yml","shortMessageHtmlLink":"Rename site.yml to site._yml"}},{"before":"fbd13611ee26bcfd56f6a163c00fffb516e29c84","after":"d08f7cf193278ec0fb55a05a10e2bb0819b815d5","ref":"refs/heads/maizatskyi/2024-09-16-throw-hook","pushedAt":"2024-09-17T17:57:22.000Z","pushType":"force_push","commitsCount":0,"pusher":{"login":"mikea","name":"Mike Aizatsky","path":"/mikea","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/3236?s=80&v=4"},"commit":{"message":"rust error callback\n\nRather then throw things directly, introduce a global callback.\nWe will override the callback in workerd to integrate with\nkj::Exception","shortMessageHtmlLink":"rust error callback"}},{"before":"1da13a1441f2d9d231646b8961d183f7e666823e","after":null,"ref":"refs/heads/maizatskyi/2024-09-03-no-abort","pushedAt":"2024-09-17T15:58:39.000Z","pushType":"branch_deletion","commitsCount":0,"pusher":{"login":"mikea","name":"Mike Aizatsky","path":"/mikea","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/3236?s=80&v=4"}},{"before":"a6804d6f17c87a16cec86cf5c3b2d2ef19c0b514","after":"b0e7d4fd9f4302b84a3066c47efc9cc9f71ca255","ref":"refs/heads/master","pushedAt":"2024-09-17T15:58:38.000Z","pushType":"pr_merge","commitsCount":1,"pusher":{"login":"mikea","name":"Mike Aizatsky","path":"/mikea","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/3236?s=80&v=4"},"commit":{"message":"no-abort (#2)\n\n_This is the first change in a series to replace abort on panic with exceptions._\r\n\r\nThis change replaces the usage of aborting `prevent_unwind` with new error-generating `catch_unwind` and `try_unwind` in ffi *rust functions* only (see the note below).\r\n\r\nIt largerly uses existing setup for returning exceptions in case of `Result` return type by forecibly enabling it.\r\n\r\nSince handling exceptions in cxx requires passing return values as pointer arguments (see example), this transformation requires specificatin of return references lifetime (eforced by #3)\r\n\r\nThere are plenty of remaining usages of `prevent_unwind` but they are all (mostly?) concerned generating various\r\nc++ operators (that we don't really use). I intend to fix them in follow ups.\r\n\r\nInternal PR 8720\r\n\r\n## Example shim \r\n\r\nFor `fn r_return_identity(_: usize) -> usize;`\r\n\r\n### Before\r\n\r\n```rust\r\n#[export_name = \"tests$cxxbridge1$r_return_identity\"]\r\nunsafe extern \"C\" fn __r_return_identity(arg0: usize) -> usize {\r\n let __fn = \"cxx_test_suite::ffi::r_return_identity\";\r\n fn __r_return_identity(arg0: usize) -> usize {\r\n super::r_return_identity(arg0)\r\n }\r\n ::cxx::private::prevent_unwind(__fn, move || __r_return_identity(arg0))\r\n}\r\n```\r\n\r\n```c++\r\n::std::size_t r_return_identity(::std::size_t arg0) noexcept {\r\n return tests$cxxbridge1$r_return_identity(arg0);\r\n}\r\n```\r\n\r\n\r\n### After\r\n\r\n```rust\r\n#[export_name = \"tests$cxxbridge1$r_return_identity\"]\r\nunsafe extern \"C\" fn __r_return_identity(\r\n arg0: usize,\r\n __return: *mut usize,\r\n) -> ::cxx::private::Result {\r\n let __fn = \"cxx_test_suite::ffi::r_return_identity\";\r\n fn __r_return_identity(arg0: usize) -> usize {\r\n super::r_return_identity(arg0)\r\n }\r\n ::cxx::private::catch_unwind(\r\n __fn,\r\n move || unsafe {\r\n ::cxx::core::ptr::write(__return, __r_return_identity(arg0))\r\n },\r\n )\r\n}\r\n```\r\n```c++\r\n::std::size_t r_return_identity(::std::size_t arg0) {\r\n ::rust::MaybeUninit<::std::size_t> return$;\r\n ::rust::repr::PtrLen error$ = tests$cxxbridge1$r_return_identity(arg0, &return$.value);\r\n if (error$.ptr) {\r\n throw ::rust::impl<::rust::Error>::error(error$);\r\n }\r\n return ::std::move(return$.value);\r\n}\r\n```","shortMessageHtmlLink":"no-abort (#2)"}},{"before":"06f80dbf29c843c98571bf8269bebb1b7af29cc4","after":"fbd13611ee26bcfd56f6a163c00fffb516e29c84","ref":"refs/heads/maizatskyi/2024-09-16-throw-hook","pushedAt":"2024-09-16T20:53:54.000Z","pushType":"force_push","commitsCount":0,"pusher":{"login":"mikea","name":"Mike Aizatsky","path":"/mikea","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/3236?s=80&v=4"},"commit":{"message":"rust error callback\n\nRather then throw things directly, introduce a global callback.\nWe will override the callback in workerd to integrate with\nkj::Exception","shortMessageHtmlLink":"rust error callback"}},{"before":"48272160c0d0fd19eb8eede5c79af88837a2b890","after":"06f80dbf29c843c98571bf8269bebb1b7af29cc4","ref":"refs/heads/maizatskyi/2024-09-16-throw-hook","pushedAt":"2024-09-16T20:52:44.000Z","pushType":"force_push","commitsCount":0,"pusher":{"login":"mikea","name":"Mike Aizatsky","path":"/mikea","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/3236?s=80&v=4"},"commit":{"message":"rust error callback\n\nRather then throw things directly, introduce a global callback.\nWe will override the callback in workerd to integrate with\nkj::Exception","shortMessageHtmlLink":"rust error callback"}},{"before":"b70c9ff80f832ca9563dd40b5527037d3be35d9d","after":"48272160c0d0fd19eb8eede5c79af88837a2b890","ref":"refs/heads/maizatskyi/2024-09-16-throw-hook","pushedAt":"2024-09-16T20:45:40.000Z","pushType":"force_push","commitsCount":0,"pusher":{"login":"mikea","name":"Mike Aizatsky","path":"/mikea","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/3236?s=80&v=4"},"commit":{"message":"rust error callback\n\nRather then throw things directly, introduce a global callback.\nWe will override the callback in workerd to integrate with\nkj::Exception","shortMessageHtmlLink":"rust error callback"}},{"before":null,"after":"b70c9ff80f832ca9563dd40b5527037d3be35d9d","ref":"refs/heads/maizatskyi/2024-09-16-throw-hook","pushedAt":"2024-09-16T17:55:36.000Z","pushType":"branch_creation","commitsCount":0,"pusher":{"login":"mikea","name":"Mike Aizatsky","path":"/mikea","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/3236?s=80&v=4"},"commit":{"message":"rust error callback\n\nRather then throw things directly, introduce a global callback.\nWe will override the callback in workerd to integrate with\nkj::Exception","shortMessageHtmlLink":"rust error callback"}},{"before":"1e88067a80e1f698793f0657aed20ccfeae3f926","after":"1da13a1441f2d9d231646b8961d183f7e666823e","ref":"refs/heads/maizatskyi/2024-09-03-no-abort","pushedAt":"2024-09-16T17:40:13.000Z","pushType":"force_push","commitsCount":0,"pusher":{"login":"mikea","name":"Mike Aizatsky","path":"/mikea","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/3236?s=80&v=4"},"commit":{"message":"no-abort","shortMessageHtmlLink":"no-abort"}},{"before":"f6ee34220afd4399d9781973c93e20589f91b577","after":"1e88067a80e1f698793f0657aed20ccfeae3f926","ref":"refs/heads/maizatskyi/2024-09-03-no-abort","pushedAt":"2024-09-13T17:01:52.000Z","pushType":"force_push","commitsCount":0,"pusher":{"login":"mikea","name":"Mike Aizatsky","path":"/mikea","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/3236?s=80&v=4"},"commit":{"message":"no-abort","shortMessageHtmlLink":"no-abort"}},{"before":"cb27568c1d57e5ed842c218fb26fc67092c25da7","after":"f6ee34220afd4399d9781973c93e20589f91b577","ref":"refs/heads/maizatskyi/2024-09-03-no-abort","pushedAt":"2024-09-13T16:46:59.000Z","pushType":"force_push","commitsCount":0,"pusher":{"login":"mikea","name":"Mike Aizatsky","path":"/mikea","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/3236?s=80&v=4"},"commit":{"message":"no-abort","shortMessageHtmlLink":"no-abort"}},{"before":"b7e31e4126acfb7a8d9a9f0b62fbc4ab40cfbfda","after":"cb27568c1d57e5ed842c218fb26fc67092c25da7","ref":"refs/heads/maizatskyi/2024-09-03-no-abort","pushedAt":"2024-09-12T21:25:39.000Z","pushType":"force_push","commitsCount":0,"pusher":{"login":"mikea","name":"Mike Aizatsky","path":"/mikea","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/3236?s=80&v=4"},"commit":{"message":"WIP: no-abort","shortMessageHtmlLink":"WIP: no-abort"}},{"before":"a675799c5f8af1b12b1edd59652ec31265c64902","after":"b7e31e4126acfb7a8d9a9f0b62fbc4ab40cfbfda","ref":"refs/heads/maizatskyi/2024-09-03-no-abort","pushedAt":"2024-09-12T20:44:55.000Z","pushType":"force_push","commitsCount":0,"pusher":{"login":"mikea","name":"Mike Aizatsky","path":"/mikea","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/3236?s=80&v=4"},"commit":{"message":"WIP: no-abort","shortMessageHtmlLink":"WIP: no-abort"}},{"before":"a38181b2989640a7bc31de32d37939fb04a7fb22","after":"a675799c5f8af1b12b1edd59652ec31265c64902","ref":"refs/heads/maizatskyi/2024-09-03-no-abort","pushedAt":"2024-09-12T19:31:25.000Z","pushType":"force_push","commitsCount":0,"pusher":{"login":"mikea","name":"Mike Aizatsky","path":"/mikea","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/3236?s=80&v=4"},"commit":{"message":"WIP: no-abort","shortMessageHtmlLink":"WIP: no-abort"}},{"before":"d5b20a1fa2c7a1873bd652ffa28daed7df51154e","after":"a38181b2989640a7bc31de32d37939fb04a7fb22","ref":"refs/heads/maizatskyi/2024-09-03-no-abort","pushedAt":"2024-09-12T19:23:33.000Z","pushType":"force_push","commitsCount":0,"pusher":{"login":"mikea","name":"Mike Aizatsky","path":"/mikea","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/3236?s=80&v=4"},"commit":{"message":"WIP: no-abort","shortMessageHtmlLink":"WIP: no-abort"}},{"before":"d941a46c89c5faa21662b13aa42c141beb0a3b9e","after":"d5b20a1fa2c7a1873bd652ffa28daed7df51154e","ref":"refs/heads/maizatskyi/2024-09-03-no-abort","pushedAt":"2024-09-12T18:01:12.000Z","pushType":"force_push","commitsCount":0,"pusher":{"login":"mikea","name":"Mike Aizatsky","path":"/mikea","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/3236?s=80&v=4"},"commit":{"message":"WIP: no-abort","shortMessageHtmlLink":"WIP: no-abort"}},{"before":"b4e3fa2f784bce7f11273f522494c954d72d6434","after":"a6804d6f17c87a16cec86cf5c3b2d2ef19c0b514","ref":"refs/heads/master","pushedAt":"2024-09-12T16:41:42.000Z","pushType":"push","commitsCount":1,"pusher":{"login":"mikea","name":"Mike Aizatsky","path":"/mikea","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/3236?s=80&v=4"},"commit":{"message":"Delete gen/cmd/build.rs","shortMessageHtmlLink":"Delete gen/cmd/build.rs"}},{"before":"5c06288deb9f82df92ff938a815aeb30e87f928a","after":"b4e3fa2f784bce7f11273f522494c954d72d6434","ref":"refs/heads/master","pushedAt":"2024-09-12T16:36:02.000Z","pushType":"push","commitsCount":1,"pusher":{"login":"mikea","name":"Mike Aizatsky","path":"/mikea","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/3236?s=80&v=4"},"commit":{"message":"Create empty lib.rs\n\nbazel's rules_rust do not support binary only crates well.\r\n\r\n\r\n\r\nhttps://bazelbuild.github.io/rules_rust/crate_universe.html#binary-dependencies","shortMessageHtmlLink":"Create empty lib.rs"}},{"before":"9af166d716ee0f69a87dd0013e938a13797cdb7e","after":"5c06288deb9f82df92ff938a815aeb30e87f928a","ref":"refs/heads/master","pushedAt":"2024-09-12T16:30:40.000Z","pushType":"push","commitsCount":22,"pusher":{"login":"mikea","name":"Mike Aizatsky","path":"/mikea","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/3236?s=80&v=4"},"commit":{"message":"Merge branch 'dtolnay:master' into master","shortMessageHtmlLink":"Merge branch 'dtolnay:master' into master"}},{"before":"951bd2d85807d0c40a96ce1436e33e26475048cd","after":null,"ref":"refs/heads/maizatskyi/2024-09-10-return-lifetimes","pushedAt":"2024-09-12T16:28:31.000Z","pushType":"branch_deletion","commitsCount":0,"pusher":{"login":"mikea","name":"Mike Aizatsky","path":"/mikea","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/3236?s=80&v=4"}},{"before":"9689fca28fcd9d929615c989a6d07b9f0c3e1fc4","after":"9af166d716ee0f69a87dd0013e938a13797cdb7e","ref":"refs/heads/master","pushedAt":"2024-09-12T16:28:30.000Z","pushType":"pr_merge","commitsCount":1,"pusher":{"login":"mikea","name":"Mike Aizatsky","path":"/mikea","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/3236?s=80&v=4"},"commit":{"message":"require lifetime annotations on all returned references (#3)\n\nTo support error propagation cxx generates C interface\r\nwhere successful result value is passed out as a pointer.\r\nThis requires moving result type to parameter position\r\nwhich changes the meaning according to the rules of\r\nimplicit liftime (each parameter gets its own lifetime).\r\n\r\nRather than implement the same set of rules that compiler\r\nto generate such annotations, demand the user to always\r\nhave explicit lifetimes for returned references.\r\n\r\nThis should not be a great deal in practice with\r\n`unsafe` being the only inconvenience.\r\n\r\nIn return the follow up no-abort work gets much simpler.\r\nI might revisit this change in the future if the burden\r\nof explicit lifetimes becomes too high.","shortMessageHtmlLink":"require lifetime annotations on all returned references (#3)"}},{"before":"df54f7072484958ec7f41e9f72dd384bd0886b6a","after":"951bd2d85807d0c40a96ce1436e33e26475048cd","ref":"refs/heads/maizatskyi/2024-09-10-return-lifetimes","pushedAt":"2024-09-10T17:45:45.000Z","pushType":"force_push","commitsCount":0,"pusher":{"login":"mikea","name":"Mike Aizatsky","path":"/mikea","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/3236?s=80&v=4"},"commit":{"message":"require lifetime annotations on all returned references\n\nTo support error propagation cxx generates C interface\nwhere successful result value is passed out as a pointer.\nThis requires moving result type to parameter position\nwhich changes the meaning according to the rules of\nimplicit liftime (each parameter gets its own lifetime).\n\nRather than implement the same set of rules that compiler\nto generate such annotations, demand the user to always\nhave explicit lifetimes for returned references.\n\nThis should not be a great deal in practice with\n`unsafe` being the only inconvenience.\n\nIn return the follow up no-abort work gets much simpler.\nI might revisit this change in the future if the burden\nof explicit lifetimes becomes too high.","shortMessageHtmlLink":"require lifetime annotations on all returned references"}},{"before":null,"after":"df54f7072484958ec7f41e9f72dd384bd0886b6a","ref":"refs/heads/maizatskyi/2024-09-10-return-lifetimes","pushedAt":"2024-09-10T15:55:10.000Z","pushType":"branch_creation","commitsCount":0,"pusher":{"login":"mikea","name":"Mike Aizatsky","path":"/mikea","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/3236?s=80&v=4"},"commit":{"message":"require lifetime annotations on all returned references\n\nTo support error propagation cxx generates C interface\nwhere successful result value is passed out as a pointer.\nThis requires moving result type to parameter position\nwhich changes the meaning according to the rules of\nimplicit liftime (each parameter gets its own lifetime).\n\nRather than implement the same set of rules that compiler\nto generate such annotations, demand the user to always\nhave explicit lifetimes for returned references.\n\nThis should not be a great deal in practice with\n`unsafe` being the only inconvenience.\n\nIn return the follow up no-abort work gets much simpler.\nI might revisit this change in the future if the burden\nof explicit lifetimes becomes too high.","shortMessageHtmlLink":"require lifetime annotations on all returned references"}},{"before":"9dbe29baa6110165e41a8941510881b03a7a200a","after":"d941a46c89c5faa21662b13aa42c141beb0a3b9e","ref":"refs/heads/maizatskyi/2024-09-03-no-abort","pushedAt":"2024-09-10T14:58:42.000Z","pushType":"force_push","commitsCount":0,"pusher":{"login":"mikea","name":"Mike Aizatsky","path":"/mikea","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/3236?s=80&v=4"},"commit":{"message":"WIP: no-abort","shortMessageHtmlLink":"WIP: no-abort"}},{"before":"317224fd07a3eae93ed8a96c3be99a273df7dc80","after":"9dbe29baa6110165e41a8941510881b03a7a200a","ref":"refs/heads/maizatskyi/2024-09-03-no-abort","pushedAt":"2024-09-09T23:17:53.000Z","pushType":"push","commitsCount":1,"pusher":{"login":"mikea","name":"Mike Aizatsky","path":"/mikea","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/3236?s=80&v=4"},"commit":{"message":"WIP: no-abort","shortMessageHtmlLink":"WIP: no-abort"}},{"before":"dd2b9fcfb63d6293b07f70708b9d1d78a823b502","after":"9689fca28fcd9d929615c989a6d07b9f0c3e1fc4","ref":"refs/heads/master","pushedAt":"2024-09-09T23:14:38.000Z","pushType":"force_push","commitsCount":0,"pusher":{"login":"mikea","name":"Mike Aizatsky","path":"/mikea","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/3236?s=80&v=4"},"commit":{"message":"Merge branch 'dtolnay:master' into master","shortMessageHtmlLink":"Merge branch 'dtolnay:master' into master"}},{"before":"9689fca28fcd9d929615c989a6d07b9f0c3e1fc4","after":"dd2b9fcfb63d6293b07f70708b9d1d78a823b502","ref":"refs/heads/master","pushedAt":"2024-09-09T22:40:52.000Z","pushType":"push","commitsCount":20,"pusher":{"login":"mikea","name":"Mike Aizatsky","path":"/mikea","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/3236?s=80&v=4"},"commit":{"message":"Merge branch 'dtolnay:master' into master","shortMessageHtmlLink":"Merge branch 'dtolnay:master' into master"}},{"before":"317224fd07a3eae93ed8a96c3be99a273df7dc80","after":"9689fca28fcd9d929615c989a6d07b9f0c3e1fc4","ref":"refs/heads/master","pushedAt":"2024-09-09T22:40:21.000Z","pushType":"force_push","commitsCount":0,"pusher":{"login":"mikea","name":"Mike Aizatsky","path":"/mikea","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/3236?s=80&v=4"},"commit":{"message":"Merge branch 'dtolnay:master' into master","shortMessageHtmlLink":"Merge branch 'dtolnay:master' into master"}}],"hasNextPage":true,"hasPreviousPage":false,"activityType":"all","actor":null,"timePeriod":"all","sort":"DESC","perPage":30,"cursor":"Y3Vyc29yOnYyOpK7MjAyNC0wOS0xN1QxODowOTozMS4wMDAwMDBazwAAAAS42Vz3","startCursor":"Y3Vyc29yOnYyOpK7MjAyNC0wOS0xN1QxODowOTozMS4wMDAwMDBazwAAAAS42Vz3","endCursor":"Y3Vyc29yOnYyOpK7MjAyNC0wOS0wOVQyMjo0MDoyMS4wMDAwMDBazwAAAASxbGrf"}},"title":"Activity ยท cloudflare/workerd-cxx"}