Cartesi: Build Appchain Rollups with Any Code
Listen Now
About This Episode
In this episode of DevNTell, Narb welcomes João Garcia, Lead Developer Advocate at Cartesi, to discuss how Cartesi enables developers to build appchain rollups using any programming language. João explains the technical foundation of the Cartesi Machine—a Linux-based virtual machine powered by RISC-V—and how it allows for high-performance off-chain computation with deterministic on-chain verification. The session includes a showcase of diverse applications ranging from on-chain gaming (such as Doom and SimCity) to verifiable AI models and NFTs. The episode concludes with a deep dive into the developer experience using the Cartesi CLI and a preview of the upcoming SDK Node v2.
Key Takeaways
Cartesi bridges the gap between Web2 and Web3 by allowing developers to use standard libraries and tools within a deterministic Linux environment.
The Cartesi Machine leverages a RISC-V emulator to ensure all off-chain computations can be verified on-chain, enabling fraud-proof execution.
App-specific rollups allow dApps to have their own dedicated CPU power and block space, avoiding the high gas costs and congestion of general-purpose blockchains.
Cartesi's SDK and CLI support a wide range of popular languages, including Python, Rust, Go, and JavaScript, making it accessible to a broad developer base.
Showcased projects like Rives and Bubble Wars demonstrate how complex gaming logic and physics can be processed deterministically on-chain.
Featured Guest
João Garcia
Lead Developer Advocate at Cartesi
Timestamps(click to jump)
Episode Transcript
Read full transcriptHide transcript
GM, GM. Welcome to what's going to be another fantastic episode of DevNTell. If you didn't know, DevNTell is a 30-minute podcast allowing founders, hackers, and anyone in between the opportunity to come on the podcast and showcase what they built. Today, I'm ecstatic to welcome João Garcia, who is the Lead Developer Advocate at Cartesi. Cartesi enables developers to build appchain rollups with any code while benefiting from the security of Ethereum. If you stick around for today's episode, you'll get to meet João, learn about Cartesi, and how you can get started with them today. All right, let's get into it.
Hey, hey, hey, GM! I'm good. Everyone's in a rush for the holidays, but it's always good to have some space to breathe and talk a little bit. Thank you for having me.
Sure, my name is João. I'm the Developer Advocacy Lead for Cartesi. I've been working at Cartesi for a little more than a couple of years now. I've been working with crypto a little while before that, and it's been a real nice journey. I love nerdy things, all nerdy things. I'm a tennis player and, as you can see from my background, I love Lord of the Rings.
Since I was small, I had this tendency towards computers. My father worked in IT; he was a developer and then started on managing positions. When I went to university, I was between technology and architecture, and I just think technology had a better market. I really found myself in university. I moved from computer engineering to computer science, and I had a very cool Apple Developer Academy internship where I met friends I work with to this day. They actually brought me to Cartesi. They've been in crypto for much longer than I have, and I always heard about what the project was.
Actually, my first interest was a while ago with Ethereum, trying to understand how it worked. I remember there were some classes at university; I really tried to study to better understand it. I found it kind of limited at the time. Then, in my previous work before Cartesi, I had the opportunity to work on a Web3 project for green energy tokenization, kind of like carbon credits. I started to have to get a better grasp of it, and then I started to see the real potential behind the thing.
The elevator pitch for Cartesi is enabling people to do what they are not capable of doing on Ethereum by itself. It works through a rollup, so it computes off-chain and brings the information on-chain afterwards, but it empowers developers to do whatever they want with the technology that has been created since the internet became a thing.
The way we do it is by running an instance of Linux inside the virtual machine that we created. That means you're not transforming one language into another; you're not transpiling or recompiling. You actually have a Linux environment, so anything that you can do on Linux, you will be able to do on it. This means you can use different libraries. You want to create a game? You can put the game engine right there. Working with AI models? You can put an AI library there. Complex financial applications that need linear regression? You can use mathematical libraries instead of recreating the whole thing on Solidity.
The Cartesi Machine itself is this more powerful execution environment. We created an emulator that uses the RISC-V instruction set. It operates like a RISC-V processor, but we have to make it deterministic. In the root of Web3, you have to be able to verify the computations. Deterministic means for every input that you send given a state, you will always have the same output. This is the whole magic. To do that, we had to make a very complex implementation of this RISC-V instruction set, but it allows you to run anything.
One of the coolest things is running Doom on-chain. Someone managed to record the gameplay of Doom and replay it on-chain to verify the gameplay. We also built Bubble Wars, which is very fun—you pay gas to move your bubble, and if it hits another bubble and it's bigger, it consumes it. We also managed to put SimCity on-chain. You deposit some tokens to start playing, and if your city makes money, you make money. We also have social dApps like Comet for co-writing and Drawing Canvas, where you can prove the creation steps of an NFT.
We created an environment which we call B.E.E., for Best Execution Environment. It has more power in the CPU than the EVM can provide. Think of EVM tooling as a pair of pliers—it's flexible, you can do a lot, but there are specialized things that give you better functionality. Cartesi tooling is like having a whole workbench of specialized tools. You can use SQLite databases, any language, and AI libraries like Scikit-learn or PyTorch.
The other advantage is rollups. You're computing off-chain, so you're not competing for block space or the execution environment of the EVM. You don't have gas prices so high or all the issues where you have to over-optimize on Solidity. App-specific rollups allow us to scale. I have this playground application which is a tutorial to learn how to develop with Cartesi, kind of like CryptoZombies. You can see how easy it is to decode messages and log them. You can just play around however you want inside Cartesi and code with JavaScript.
The CLI team developed an amazing CLI for Cartesi where you can bootstrap different apps from templates. You can have a head start with Python, Ruby, C++, Java, JS, Rust, Go, and more. This SDK allows you to run your apps locally based on Foundry, but it's all ready to go with simple commands like 'cartesi create' and 'cartesi run'. There are high-level frameworks for a few languages already which handle inputs, outputs, and asset deposits.
Lucas asked, are there any plans to add support for Java in the CLI? If not, is it something that he could do himself easily as a Java dev?
It's something that you could do yourself, but it's already supported on the CLI! You can just get a template and see how it works. We are looking for someone to make a Java high-level framework as well, so that could be an awesome thing to see. Beyond what I showcased, I'd really love to see an automated market maker or high-complexity governance solutions with quadratic voting, which would be so much cheaper to do on Cartesi than on Solidity.
We are developing the new version of the SDK, the Node v2. It's going to have a much more interesting developer experience. It's going to include our fraud proof algorithms, so your computation will actually be verified and inherit Ethereum's security. It will also come with new convenience features, moving to a unified JSON-RPC approach so Web3 developers have a better understanding right from the get-go.
Excellent. For the developers and audience members interested in getting started, what's the best way for them to do that? Where would you recommend they start?
They should take a look at our Discord. We are an open-source project to the level that even our R&D discussions are in the open on Discord. Follow us on X as well; our marketing team is very active there. Thank you again for having me here, this was awesome.
It was a pleasure having you on the show and learning all about Cartesi. I'm a nerd myself and I was nerding out when you showed Doom on-chain. I want to wish everybody a very happy Wednesday and we'll catch you back here for another episode on Friday. Cheers.
Listen On
Resources & Links
Share This Episode
Share on XWatch Episodes Live!
Subscribe to our event calendar and never miss a live episode.
View Event Calendar