A library for `exec`ing Python code safely using WASM
Inspired by Simon Willison's blog post that was catalyzed by this HN post: https://news.ycombinator.com/item?id=34598024 wasm_exec is a Wasm-powered, sandboxed implementation of exec() for safely running dynamic Python code There are number of use-cases emerging that require arbitrary code execution, often code that is generated by LLMs (Large Language Models) like ChatGPT. This can enable some really cool functionality - like generative BI or website generation - but also introduce a massive security flaw if implemented via eval() or exec(). This is because arbitrary code can…
What it does
In the maker’s words, at launch
Inspired by Simon Willison's blog post that was catalyzed by this HN post: https://news.ycombinator.com/item?id=34598024 wasm_exec is a Wasm-powered, sandboxed implementation of exec() for safely running dynamic Python code There are number of use-cases emerging that require arbitrary code execution, often code that is generated by LLMs (Large Language Models) like ChatGPT. This can enable some really cool functionality - like generative BI or website generation - but also introduce a massive security flaw if implemented via eval() or exec(). This is because arbitrary code can be executed using these methods. In a worst case scenario, exec'ing arbitrary code could enable some to rm -rf / your entire server! This library intends to provide a secure method of executing arbitrary Python code to empower LLM-based code generation. This was originally intended to be a direct PR to Langchain but given that the problems with exec() extend to the entire Python ecosystem, it was decided that it would be better as a standalone package. Given the love for Wasm on HN, I thought some folks might be interested,and I'd love additional feedback or contributions to the code base.
Does the same job
all alternatives →- WRWASM runtime for sandboxing Python code2024 · github.com · ▲9
A while ago I started experimenting with compiling the Python interpreter to WASM. To build a secure, fast, and lightweight sandbox for code execution — ideal for running LLM-generated Python code.
- PTPythonpy – the swiss army knife of the command line2014 · github.com · ▲220
- WWWasmino = WASM and Arduino – Running Arduino Code in Browser2020 · blog.yifangu.com · ▲84
- EAEno – A lightning fast, user-friendly YAML/TOML alternative2018 · ▲102
eno [1] - A modern plaintext language w/ libraries [2] for JavaScript, Python, Ruby & soon more! We migrated a big relational research database to a file-based solution - requirements were: - Super fast and easy editability for users - Highest performance for parsing/validating >10K documents on every user change. Our trials with YAML/TOML showed us that we wanted something both faster [3][4] and easier [4], something tailored for file-based content management ... and after months of research & development it's now publicly available (under MIT license) for everyone! Last but…

- MAMys – an attempt to create a statically typed Python-like language2020 · github.com · ▲50
More dev tools this month
the category →



Open-source GTM skills for technical founders
Dev tools · 29d ago · gtmcofounder.com

OpenTrailPaper is open-source bike computer firmware for the LilyGO T5S3 4.7" E-Paper PRO. It supports offline maps, GPX routes, FIT recording and Bluetooth sensors.
Dev tools · 1d ago · opentrailpaper.com

Launched alongside, June 2023
the whole month →- NI
Heya HN, I've been working on a reddit-like platform as my primary side project for the last few years. Doing a (very) soft launch today, mainly because I want to use it to encourage discussion of alternatives. How non.io works: 1. Free to browse, paid to interact. 2. Minimum subscription is $2 (though you can choose more). I take $1 to run the servers, everything left gets split evenly between everything you upvote that month. It's a simple model, but I hope it's a better one than the freemium model we've been relying on for the last few years. Fundamentally I feel like any ad-supported…
Commerce · 2023 · non.io

Typefully 2.0▲931Effortlessly publish on Twitter and LinkedIn, now with AI
Growth · 2023 · typefully.com

SlashPage▲760Create websites in seconds to build your first 1K community
Growth · 2023 · slashpage.com
