Stof is an open-source runtime for logic you don't own or fully trust.<p>Imagine a JSON document with functions inside, scoped to just the document that contains them. Stof instantiates this doc as a small wasm env, and makes these functions safe to call. They can't acc
Run AI-generated logic safely | Stof Skip to main content stof Start Learn Libraries Cookbook Playground Blog GitHub Discord Search New Stof 0.10: safe by default, errors you can read, and a language server Run AI-generated logic safely, inside your app. Stof is JSON with functions. One document holds data and the logic that works on it, and your app runs it in a sandbox, in-process, in Rust, JavaScript, or Python. Get started Open the playground npm i @formata/stof cargo add stof pip install stof pricing.stof Open in the playground price : 20 discount : ( p : float ): float => p * 0.8 fn total () -> float { self.discount(self.price) } // your app calls it doc.call('total'); 16 The discount is a function stored in a field, so new logic goes in the same way new data does. It starts as JSON
Run AI-generated logic safely | Stof Skip to main content stof Start Learn Libraries Cookbook Playground Blog GitHub Discord Search New Stof 0.10: safe by default, errors you can read, and a language server Run AI-generated logic safely, inside your app. Stof is JSON with functions. One document holds data and the logic that works on it, and your app runs it in a sandbox, in-process, in Rust, JavaScript, or Python. Get started Open the playground npm i @formata/stof cargo add stof pip install stof pricing.stof Open in the playground price : 20 discount : ( p : float ): float => p * 0.8 fn total () -> float { self.discount(self.price) } // your app calls it doc.call('total'); 16 The discount is a function stored in a field, so new logic goes in the same way new data does. It starts as JSON