polkavm-derive 0.31.0
“The derive crate for PolkaVM guest programs”
Rust asm! inline assembly macroRust global_asm! module-level assembly
SHA-256c3d944b6b4e792c2a120232b52bd6f2c9dd3071d3f48462afb2b5d00cb9f7ac9
MaleculeH(Mg)Md
Evidence
2#![doc = include_str!("../README.md")]
3
4pub use polkavm_derive_impl_macro::__PRIVATE_DO_NOT_USE_polkavm_define_abi as polkavm_define_abi;
5pub use polkavm_derive_impl_macro::__PRIVATE_DO_NOT_USE_polkavm_export as polkavm_export;
6pub use polkavm_derive_impl_macro::__PRIVATE_DO_NOT_USE_polkavm_import as polkavm_import;
7
8pub mod default_abi {
9 polkavm_derive_impl_macro::__PRIVATE_DO_NOT_USE_polkavm_impl_abi_support!();
10}
11
12/// Increases the size of the program's heap by a given number of bytes, allocating memory if necessary.
13/// If s …
13:75… ful returns a null pointer.
14///
15/// When called with a `size` of 0 this can be used to find the current end of the heap. This will always succeed.
16///
17/// Memory alloc …
21:40… ays safe.
22 unsafe {
23 let address;
24 core::arch::asm!(
25 ".insn r 0xb, 1, 0, {dst}, {size}, zero",
26 size = in(reg) size,
27 dst = lateout(reg) address,
77:89… "), doc))]
78unsafe impl core::alloc::GlobalAlloc for LeakingAllocator {
79 #[inline]
80 unsafe fn alloc(&self, layout: core::alloc::Layout) -> *mu …
98:11… s! min_stack_size {
99 ($size:expr) => {
100 ::core::arch::global_asm!(
101 ".pushsection .polkavm_min_stack_size,\"R\",@note\n",
102 ".4byte {size}",
103 ".popsection\n",
104 …
No evidence locations were recorded for this file. Raw result