Hey HN,

I built SolScript, a compiler that lets you write smart contracts in Solidity syntax and deploy them to Solana.

The problem: Solana has mass dev interest (17k+ active developers in 2025), but the Rust learning curve remains a 3-6 month barrier. Anchor helps, but you still need to grok ownership, lifetimes, and borrowing. Meanwhile, there are 30k+ Solidity developers who already know how to write smart contracts.

SolScript bridges that gap. You write this:

  contract Token {
      mapping(address => uint256) public balanceOf;

      function transfer(address to, uint256 amount) public {
          balanceOf[msg.sender] -= amount;
          balanceOf[to] += amount;
          emit Transfer(msg.sender, to, amount);
      }
  }
And it compiles to a native Solana program with automatic PDA derivation, account validation, and full Anchor compatibility.

How it works:

- Parser turns Solidity-like source into an AST - Type checker validates and annotates - Two codegen backends: (1) Anchor/Rust output that goes through cargo build-sbf, or (2) direct LLVM-to-BPF compilation - Mappings become PDAs automatically, account structs are derived from your type system

What's supported:

- State variables, structs, arrays, nested mappings - Events and custom errors - Modifiers (inlined) - Cross-program invocation (CPI) - SPL Token operations - msg.sender, block.timestamp equivalents

Current limitations:

- No msg.value for incoming SOL (use wrapped SOL or explicit transfers) - No Token 2022 support yet (planned for v0.4) - Modifiers are inlined, so keep them small

The output is standard Anchor/Rust code. You can eject anytime and continue in pure Rust. It's a launchpad, not a lock-in.

Written in Rust. Ships with a VS Code extension (LSP, syntax highlighting, go-to-definition, autocomplete).

Install: cargo install solscript-cli

Repo: https://github.com/cryptuon/solscript

I'd love feedback on the language design, the compilation approach, or use cases I haven't thought of. Happy to answer questions about the internals.