This repository was archived by the owner on Aug 25, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +13
-6
lines changed Expand file tree Collapse file tree 3 files changed +13
-6
lines changed Original file line number Diff line number Diff line change @@ -65,7 +65,8 @@ static ALLOC: wee_alloc::WeeAlloc = wee_alloc::WeeAlloc::INIT;
6565// This translates into an `unreachable` instruction that will
6666// raise a `trap` the WebAssembly execution if we panic at runtime.
6767#[panic_implementation]
68- fn panic (_info : & :: core :: panic :: PanicInfo ) -> ! {
68+ #[no_mangle]
69+ pub fn panic (_info : & :: core :: panic :: PanicInfo ) -> ! {
6970 unsafe {
7071 :: core :: intrinsics :: abort ();
7172 }
@@ -74,7 +75,8 @@ fn panic(_info: &::core::panic::PanicInfo) -> ! {
7475// Need to provide a tiny `oom` lang-item implementation for
7576// `#![no_std]`.
7677#[lang = " oom" ]
77- extern " C" fn oom () -> ! {
78+ #[no_mangle]
79+ pub extern " C" fn oom () -> ! {
7880 unsafe {
7981 :: core :: intrinsics :: abort ();
8082 }
Original file line number Diff line number Diff line change @@ -19,7 +19,8 @@ static ALLOC: wee_alloc::WeeAlloc = wee_alloc::WeeAlloc::INIT;
1919// This translates into an `unreachable` instruction that will
2020// raise a `trap` the WebAssembly execution if we panic at runtime.
2121#[ panic_implementation]
22- fn panic ( _info : & :: core:: panic:: PanicInfo ) -> ! {
22+ #[ no_mangle]
23+ pub fn panic ( _info : & :: core:: panic:: PanicInfo ) -> ! {
2324 unsafe {
2425 :: core:: intrinsics:: abort ( ) ;
2526 }
@@ -28,14 +29,16 @@ fn panic(_info: &::core::panic::PanicInfo) -> ! {
2829// Need to provide a tiny `oom` lang-item implementation for
2930// `#![no_std]`.
3031#[ lang = "oom" ]
31- extern "C" fn oom ( ) -> ! {
32+ #[ no_mangle]
33+ pub extern "C" fn oom ( ) -> ! {
3234 unsafe {
3335 :: core:: intrinsics:: abort ( ) ;
3436 }
3537}
3638
3739// Needed for non-wasm targets.
3840#[ lang = "eh_personality" ]
41+ #[ no_mangle]
3942pub extern "C" fn eh_personality ( ) { }
4043
4144// Now, use the allocator via `alloc` types! ///////////////////////////////////
Original file line number Diff line number Diff line change @@ -65,7 +65,8 @@ static ALLOC: wee_alloc::WeeAlloc = wee_alloc::WeeAlloc::INIT;
6565// This translates into an `unreachable` instruction that will
6666// raise a `trap` the WebAssembly execution if we panic at runtime.
6767#[panic_implementation]
68- fn panic(_info: &::core::panic::PanicInfo) -> ! {
68+ #[no_mangle]
69+ pub fn panic(_info: &::core::panic::PanicInfo) -> ! {
6970 unsafe {
7071 ::core::intrinsics::abort();
7172 }
@@ -74,7 +75,8 @@ fn panic(_info: &::core::panic::PanicInfo) -> ! {
7475// Need to provide a tiny `oom` lang-item implementation for
7576// `#![no_std]`.
7677#[lang = "oom"]
77- extern "C" fn oom() -> ! {
78+ #[no_mangle]
79+ pub extern "C" fn oom() -> ! {
7880 unsafe {
7981 ::core::intrinsics::abort();
8082 }
You can’t perform that action at this time.
0 commit comments