Simon Willison on Nostr: I figured out how to use npm and webpack to get a copy of QuickJS (a JavaScript ...
I figured out how to use npm and webpack to get a copy of QuickJS (a JavaScript runtime complied to WebAssembly, useful for executing untrusted code in a sandbox) that I can load like this:
```
<script src="dist/quickjs.js"></script>
```
Detailed notes here - so glad to have found a recipe for this that fits my very specific tastes in JavaScript
https://til.simonwillison.net/npm/self-hosted-quickjsPublished at
2024-03-20 18:44:45Event JSON
{
"id": "036f06cc37ece144c8819455b47c26cc491c94d3f98cd929fa5de48f2a9651e3",
"pubkey": "8b0be93ed69c30e9a68159fd384fd8308ce4bbf16c39e840e0803dcb6c08720e",
"created_at": 1710960285,
"kind": 1,
"tags": [
[
"proxy",
"https://fedi.simonwillison.net/users/simon/statuses/112129493270757795",
"activitypub"
]
],
"content": "I figured out how to use npm and webpack to get a copy of QuickJS (a JavaScript runtime complied to WebAssembly, useful for executing untrusted code in a sandbox) that I can load like this:\n```\n\u003cscript src=\"dist/quickjs.js\"\u003e\u003c/script\u003e\n```\nDetailed notes here - so glad to have found a recipe for this that fits my very specific tastes in JavaScript\nhttps://til.simonwillison.net/npm/self-hosted-quickjs",
"sig": "bc965d557fb24653e955eca44ab937f5be5e63066e887141b5dc201ebfb688ca752f29ddad33fe2ed08b4b8c64a17ca05ab5b25f2093bd97ecc967dd3f8cdd61"
}