Javalana
Compile java (javacpp) to Solana programs via LLVM bitcode.
Install / Use
/learn @dorkydhruv/JavalanaREADME
Javalana
Compile shit to Solana programs via LLVM bitcode.
What It Does
Java → LLVM bitcode → Solana sBPF → on-chain execution
Uses JavaCPP to call LLVM C API directly, generating bitcode without intermediate text representation.
Quick Start
./build.sh
node invoke.js <PROGRAM_ID>
Expected output: Program log: Hello from Javalana!
Setup
# Install dependencies
brew install llvm
cargo install sbpf-linker
How Solana Syscalls Work
Syscalls are memory-mapped function pointers. Cast the address to a function pointer and call it:
// sol_log_ lives at 0x207559bd
LLVMValueRef syscall_addr = LLVMConstInt(i64, 544561597L, 0);
LLVMValueRef func_ptr = LLVMBuildIntToPtr(builder, syscall_addr,
LLVMPointerType(log_type, 0), "log");
LLVMBuildCall2(builder, log_type, func_ptr, args, 2, "");
In the end we're just generating LLVM bitcode that Solana can understand, and then linking it to sBPF with sbpf-linker.
Resources
Related Skills
node-connect
339.1kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
83.8kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
339.1kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
commit-push-pr
83.8kCommit, push, and open a PR
