In brief. CX is a programming language Skycoin began as the language for smart contracts on its blockchains, run as CX chains. Work on it stopped in 2023. In November 2026 it started again in a new repository, skycoin-cx, which merges the old ones. There is no release yet. The language builds on current Go and its tests pass on Linux, macOS and Windows. CX chains never worked beyond small examples, and the revival has not touched them, so making CX safe to run on a blockchain is still a large amount of work that has not started.
History
Until 2023, CX was three repositories.
| Repository | What it is | Last change |
|---|---|---|
| cx | The language, its compiler and virtual machine | March 2023 |
| cx-chains | A fork of the Skycoin blockchain that runs CX programs | March 2021 |
| cx-tracker | A registry of CX chains and their peers | January 2021 |
The last release of CX is 0.8.0, from March 2021. It targets Go 1.15, and cx-chains Go 1.14, both long out of support.
On 17 November 2026 the language came back into active development in skycoin-cx. It merges skycoin/cx, the CX playground repositories, the old benchmarks and the CX unit test library into one Go module, which builds on Go 1.27.3. Every package sits one level below the root as t<N>-<name>, where N is its tier in the import graph, and a check in make check makes sure a package only imports packages of lower tiers. Open issues from skycoin/cx that still apply were filed again in the new repository.
What the revival has done
The daily development updates describe the work as it happened: 17 November, 18 November, 19 November and 20 November. In short:
- Honest tests and CI. The CX test runner used to hide failures. It was fixed, and CI now runs
make checkon Linux, macOS and Windows. Tests for bugs that are still open are marked as known issues, each with its issue number. - Rules for the code. No hidden
initfunctions, no interfaces that embed other interfaces, and norecover. A failure of a path, a file or the network returns an error, and any other failure is an assert that ends the process. Scripts inmake checkenforce each rule, and the exceptions are listed in files that only shrink. - Versioned language. Every opcode now has a fixed number, and the language has dated versions. Version
2611200001removed the built-in operators on strings, so strings are compared and joined with library functions, and pointers can no longer be ordered. Version2611200002moved the built-in libraries undersys/, so a program writesimport "sys/string"orimport "sys/os", and gave the string functions full names such asstring.Concatenation. - A new virtual machine. A program whose functions can all be lowered to it runs on a new flat virtual machine that does not allocate while it runs. So far that covers the scalar types, control flow, arrays, structs, pointers and simple printing. Other programs run on the old loop, and
cx -executorcan force either one. - A file sandbox. A running program can only open files inside one directory, the working directory or the one given with
cx -sandbox. - Many fixes to the compiler, the runtime and the package loader, found once the tests ran.
- Around the language, three new repositories: a web playground that runs
cxin the browser through WebAssembly, an Android playground, and a small Forth VM that runs a subset of CX's intermediate form, built for the host and for the ESP32.
What works and what does not
Built from a clean clone of skycoin-cx at commit 46d9708e, cx runs the examples on these pages, and make test passes all 231 of its stable program tests. The repository README and its open issues list what is broken. Some of what we found while checking the examples on these pages:
for true { ... }does not run its body.- A method call whose first argument is not a literal does not compile.
- A function that returns an array makes the compiler panic.
- A pointer returned from a function can point at stack memory that a later call overwrites.
- Affordances cannot be used, because their package cannot be imported.
- The REPL ends with a panic on any input.
The documentation notes each of these where it matters.
What CX chains were meant to be
In a CX chain, a CX program's state lives on the blockchain. Each transaction carries a piece of CX code. To make a block, a node loads the program's state from the chain, runs the transaction's code against it, and stores the new state back in the block. The program and the chain state are the same thing, which was the idea that set CX apart.
The design holds together on paper. The implementation was never finished.
What does not work
None of these has changed with the revival.
- CX chains run an old CX. cx-chains is built on a snapshot of CX from December 2020, so nothing done to the language since then, including the revival, reaches it.
- A chain program is limited to one package. That rules out libraries and programs built from several parts. The code marks this with a TODO.
- Running a program is not deterministic. Every node must get exactly the same result from the same transaction. CX programs can read the clock and use random numbers, and nothing stops them.
- There are no limits on what a program costs. There is no gas or step metering, so a transaction with an endless loop would stop the chain.
- Errors stop the virtual machine. Many errors in the CX runtime end the process instead of failing one transaction, so one bad transaction could crash a node. The revival made this a written rule for errors that are not about files, paths or the network.
- Chain programs can reach the outside world. The standard library's network and operating-system packages are not walled off from code that runs on a chain. The new file sandbox keeps file access inside one directory, but that is not a wall around chain code.
- There is no written consensus rule. What makes a block valid, and what happens when nodes get different results, was never specified.
- The tracker does not sign the chain specs it serves, which the code also marks as a TODO.
Only small examples, such as a counter, were ever shown running on a CX chain.
What finishing it would take
In order of what depends on what:
- Bring the language up to date with current Go and its own tests. In progress in skycoin-cx since November 2026.
- Make the virtual machine deterministic: randomness and time from the block, and only operations that give the same result everywhere.
- Add metering, with a cost per operation and a limit per transaction.
- Turn runtime errors into failed transactions that roll back their changes.
- Separate the parts of the standard library a chain program may use from the parts it may not.
- Allow more than one package per chain program.
- Rebuild cx-chains on the current CX instead of the 2020 snapshot.
- Write down the consensus and execution rules.
- Finish the tracker and the tools: spec signing, an explorer, and a deploy flow that works end to end.
None of this is unusual work, but it is a lot of it. An assessment in April 2026 estimated one to two years of work for one person before a credible test network.
Possible directions
Three paths have been considered for CX chains. None has been chosen.
- Finish CX as it is. This keeps the original idea of the program state being the chain state, and it needs all of the work above.
- Keep the language, replace the virtual machine. CX could compile to WebAssembly and run on an existing smart-contract runtime that already has deterministic execution, metering and sandboxing. This is much less work, but the program would no longer be the chain state.
- Start again from the design. A new implementation of the same ideas, without the old code's unfinished parts. This costs the most.
Using CX today
Build CX from skycoin-cx as the installation page describes. The web playground still runs skycoin-cx from 18 November 2026, before the language versions, so current programs do not run there yet. There is no release, and the language is changing, so a program written today may need changes later. The repository's LanguageGuide.md is the language reference, and the documentation here follows it. The CX book describes the language as it was designed in 2021, so some of its examples no longer compile. Bugs go to the skycoin-cx issues, and questions are welcome in @skywire on Telegram.