Where is [kernel_base + 0x18]

I’m reading the bootloader code and I see the jump into rust is done using

mov rax,  [kernel_base + 0x18]
jmp rax

This seems like magic. How does this work?

That is the ELF entry point

mov rax, [kernel_base + 0x18]

essentially means “load rax with the value in memory that starts 0x18 bytes after kernel_base”.
In other words, it reads entry point address from the ELF header.