Solux Docs

CLI and local validator#

solux-localnet#

A Solana JSON-RPC server with the Solux program loaded, running on LiteSVM (the Agave runtime, in-process). It starts in a second and runs on Windows, where solana-test-validator does not.

cargo run --release --manifest-path crates/sim/Cargo.toml --bin localnet -- --port 8899
Flag Default
--port 8899 HTTP port, on 127.0.0.1
--so programs/solux/target/deploy/solux.so The compiled program
--program-id B8MCmdQhqXmasf75YdSCBMTgUqeSwbqaHc27ryWL4v8a Where to load it

It answers the methods the CLI and SDK use, with the shapes a validator returns: getLatestBlockhash, sendTransaction, simulateTransaction, getSignatureStatuses, getTransaction, getSignaturesForAddress, getAccountInfo, getMultipleAccounts, getBalance, requestAirdrop, getMinimumBalanceForRentExemption, getSlot, getBlockHeight, getEpochInfo, getHealth, getVersion. Every transaction is final as soon as it is sent, and there are no websockets. State lives in memory: restart it and the machines are gone.

solux#

cargo install --path crates/cli
Command
solux boot <image> Create a machine for an ELF or Linux image, upload it, check it, then crank
solux crank Send Steps to the saved machine
solux type <keys> Queue keys (a literal \n is Enter)
solux status Status, steps, instructions, pc and the last 4 KB printed
solux close Delete both accounts and get the rent back
Flag Default
--url http://127.0.0.1:8899 RPC
--keypair images/localnet-payer.json Payer and authority; created if missing
--program programs/solux/target/deploy/solux-keypair.json Program id, from its keypair
--dir images Where the machine and RAM keypairs are saved
--ram 10M RAM size (256K, 1M, 10M)
--per-step 25000 Instructions per Step, at most; the CLI lowers it to fit the measured cost
--window 8 Steps in flight at once
--until Stop cranking once the console contains this text
--max-steps Stop after this many Steps
--lines images/boot-onchain.tsv Every console line with its step and signature

The CLI never reads your Solana CLI configuration: it cannot spend from a real wallet unless --url and --keypair say so. On a local URL it airdrops what the payer needs.

Boot Linux#

solux boot images/Image --ram 10M --until "login: "
solux type 'root\n'
solux crank --until "# "

The kernel takes 2,013 upload transactions and 2,381 Steps to reach the login prompt.