philcoin tools for Phil
Solana devnet

Phil is on a blockchain

A program written in Phil, compiled by Phil's own compiler, is deployed on Solana's public test network. Anyone can call it, and when they do, the code that runs is what Phil's compiler produced.

It is a small program: it returns a number. That is everything Phil's compiler can build today, and it is the first step, not the last.

Run it yourself

Press the button and a Solana devnet node runs the Phil program now and sends back its log. No wallet is needed and it costs nothing.

The node executes the program against the live chain and returns the result without recording a transaction, which is why it is free. The recorded transaction below was signed and paid for.

The recorded call



  

Checked every night

    How it got there

    1. The Phil program

      Written in the form Phil's compiler reads today.

    2. Phil's compiler turns it into LLVM

      This is the output of philc, unmodified. The same compiler runs in the playground.

    3. Solana's toolchain builds a program from it

      Two adjustments are made first: the lines naming a desktop target are dropped, and main is renamed so that Solana's entry point can call it. A few lines of C form that entry point; they call the Phil function and write its result to the log. The finished program is bytes.

    4. It is deployed and called

      A workflow on GitHub deploys the program to devnet and sends it one transaction. The log above is what Solana recorded.

    What this is and is not

    The pipeline is in onchain/. This is a community project and is not affiliated with Phil or Solana.