awayto
quickjs-emscripten
Our great sponsors
awayto | quickjs-emscripten | |
---|---|---|
25 | 21 | |
19 | 1,122 | |
- | - | |
0.0 | 9.4 | |
over 1 year ago | 15 days ago | |
TypeScript | TypeScript | |
MIT License | GNU General Public License v3.0 or later |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
awayto
-
Show HN: Awayto v2 short demo; an actual all-in-one framework
Hey folks, just putting this up as a demo link for people to try out. It's a project I've been working on since January and in light of recent framework posts lately I figured I'd start talking about my own.
The link is a demo site of Awayto v2 [1] (ignore the front page info that's all from version 1). Awayto [0] started out as a quick deploy app which grew to exist via AWS. I felt the need to make something that wasn't so closely tied to cloud infra, and Awayto v2 is that. Currently deployed on hetzner vms, using Tailscale for networking, there is a great deal of things going on. There is a local installation path planned, as long as you provide your own servers, etc, as it all just works on Tailscale anyway. I'm still working on docs, but the goal is to spit out _everything_ a dev might want to control in their stack. My current version of deploying to hetzner sets up 7 servers (2 ns, exit, build, app, db, svc). Git profile [2] for more info, tech stack info.
This is just a short demo and will only be up a limited time. There's no email validation or anything, gibberish is welcome. You are not being tracked. I know I need how-to docs, video assists, and all that. Slow and steady. It's being hosted from a single warehouse in the Pacific Northwest, be kind. Caching is in play and not perfectly tuned so maybe wait a few minutes if something doesn't automatically show up. Any feedback is awesome. Cheers!
[0] https://github.com/keybittech/awayto
-
Functional Web App (FWA)
This is really cool to see in this format. Over the last few years I have spent my free time crafting a framework under similar ideologies. I think a lot of web devs end up making similar tools throughout their career, but perhaps never get to the point of sharing what they make. I finally formalized my framework last year and am well into battle testing it with clients and different projects. https://awayto.dev
In a similar light to what this FWA group is presenting, I also have put forth some points about why this style of web dev architecture is important and effective. https://awayto.blog/posts/webapps/
Actually, I started out reading Million Dollar Consulting last year and one of the first chapters essentially talks about the importance of having a portfolio of work, and being able to capitalize off that body of knowledge within to grow more as a consultant. Well, I took that as a sign to formalize a framework that would allow me to do my development work in a much more effective manner, as well as provide more out of the box functionality for my clients.
Overall, the experience has been really positive. Obviously I don't get to use my own framework with every client, and that's a good thing. But, when working with clients who need basic business problems solved, having an FWA style framework is going to allow you to iterate so much faster than traditional MVC platforms. At least this has been my experience. Specifically to that point, with templated and loosely coupled parts, you don't have to spend too long building your web app to get it to do something exceptional.
-
Ask HN: Who wants to be hired? (March 2022)
Location: Pacific Northwest
Remote: Yes
Willing to relocate: For Contract or Consulting Only
Technologies: Java, C#, Javascript, Typescript, HTML, CSS, React, Redux, Material UI, NodeJS, Webpack, Postgres, Cognito, Lambda, CloudFormation, CloudFront, S3, API Gateway, HITRUST, FERPA
Résumé/CV: https://www.linkedin.com/in/joe-mccormick-76224429/
Email: [email protected]
My name is Joe. If you are looking for a consulting- or contract-based resource, I am interested and open to take on projects of many varieties. Over the last 10 years, my professional experience has touched on Education, Professional Consulting, IT Management, E-Commerce, and I hold my MA in English teaching. I have helmed numerous, extremely successful software development teams within the companies I have worked at, on projects of large complexity, some with millions of users and in revenue.
Check out https://awayto.dev which is a free open source web application platform. It uses React, Redux, Material UI, NodeJS, Typescript, Webpack, Postgres, Cognito, Lambda, CloudFormation, CloudFront, S3, API Gateway, as well as my own custom scripts. Awayto makes it fast to deploy low-cost web applications and then have a skilled developer come in and build up your application.
Thank you for your time.
-
Ask HN: Freelancer? Seeking freelancer? (February 2022)
SEEKING WORK - Pacific Northwest - Contract/Consulting Remote/Onsite
If you are looking for a consulting- or contract-based resource, I am interested and open to take on projects of many varieties. Over the last 10 years, my professional experience has touched on Education, Professional Consulting, IT Management, E-Commerce, and I hold my MA in English teaching. I have led multiple successful development teams within the companies I have worked at, on projects of large complexity, some with millions of users and in revenue.
For my most recent completed work, I created https://awayto.dev, a free open source web application generation platform. It uses React, Redux, Material UI, NodeJS, Typescript, Webpack, Postgres, AWS Cognito, Lambda, CloudFormation, CloudFront, S3, API Gateway, as well as my own custom scripts. Awayto makes it fast to deploy low-cost web applications and then have a skilled developer come in and build up your application. https://github.com/keybittech/awayto
Thank you for your time.
Javascript, Typescript, Java, C#, HTML, CSS, HITRUST, FERPA
Inquiries: [email protected] Website: https://awayto.dev LinkedIn: https://www.linkedin.com/in/joe-mccormick-76224429/
-
Ask HN: Who wants to be hired? (February 2022)
Willing to relocate: For Contract or Consulting Only
Technologies: Java, C#, Javascript, Typescript, HTML, CSS, React, Redux, Material UI, NodeJS, Webpack, Postgres, Cognito, Lambda, CloudFormation, CloudFront, S3, API Gateway, HITRUST, FERPA
Résumé/CV: https://www.linkedin.com/in/joe-mccormick-76224429/
Email: [email protected]
If you are looking for a consulting- or contract-based resource, I am interested and open to take on projects of many varieties. Over the last 10 years, my professional experience has touched on Education, Professional Consulting, IT Management, E-Commerce, and I hold my MA in English teaching. I have led multiple successful development teams within the companies I have worked at, on projects of large complexity, some with millions of users and in revenue.
For my most recent completed work, I created https://awayto.dev, a free open source web application generation platform. It uses React, Redux, Material UI, NodeJS, Typescript, Webpack, Postgres, AWS Cognito, Lambda, CloudFormation, CloudFront, S3, API Gateway, as well as my own custom scripts. Awayto makes it fast to deploy low-cost web applications and then have a skilled developer come in and build up your application. https://github.com/keybittech/awayto
Thank you for your time.
-
Ask HN: Who Wants to Collaborate?
I made a web application generation tool built on top of AWS. It deploys all the basics you need for a web application in the modern era (db, ui, api, users, groups, roles).
https://awayto.dev -- Check out the video
https://github.com/keybittech/awayto
If you like making tools for developers, contractors, and the business world. Come check us out and join the discord!
Hey there, I work on a project called Awayto. It generates and deploys web applications to AWS with all the base line bells and whistles (db, api, ui, user mgmt, react, typescript). I enjoy working on tools for developers and this is a project that's supposed to help developer consultants. It's a full stack framework, and there are of course many ways you could help or be involved, so if it sounds interesting please check it out!
https://github.com/keybittech/awayto
https://awayto.dev
-
You Don't Need the Cloud
A lot of the comments here are about difficulty cloud tech navigation/adoption. I create a framework built on top of AWS to try to alleviate a great deal of the infra management aspects of running web applications. It sets you up with all the basics out of the box in about 10 minutes (db, api, ui, users, groups, roles).
https://awayto.dev
https://github.com/keybittech/awayto
Along the same vein as other posts in this thread, startups and contractors need instantaneous test bed environments that support a lot out of the gate, and which can be the basis to scale from. I've been a contractor off and on for a few years and have seen this need first hand. So my tool is meant to fill in the foundations of great ideas, so those ideas can grow faster. I think that's an essential trait of cloud services that you will be hard-pressed to find elsewhere.
-
Ask HN: Freelancer? Seeking freelancer? (January 2022)
SEEKING WORK - Pacific Northwest - Contract/Consulting Remote/Onsite
If you are looking for a consulting- or contract-based resource, I am interested and open to take on projects of many varieties. Over the last 10 years, my professional experience has touched on Education, Professional Consulting, IT Management, E-Commerce, and I hold my MA in English teaching. I have led multiple successful development teams within the companies I have worked at, on projects of large complexity, some with millions of users and in revenue.
As a side project, I created https://awayto.dev, a free open source web application generation platform. It uses React, Redux, Material UI, NodeJS, Typescript, Webpack, Postgres, AWS Cognito, Lambda, CloudFormation, CloudFront, S3, API Gateway, as well as my own custom scripts. Awayto makes it fast to deploy low-cost web applications and then have a skilled developer come in and build up your application.
Thank you for your time.
Java, C#, Javascript, Typescript, HTML, CSS, PHP, Ruby, Python, HITRUST, FERPA
Inquiries: [email protected]
-
Ask HN: Who wants to be hired? (January 2022)
Remote: Yes
Willing to relocate: For Contract or Consulting Only
Technologies: Java, C#, Javascript, Typescript, HTML, CSS, React, Redux, Material UI, NodeJS, Webpack, Postgres, Cognito, Lambda, CloudFormation, CloudFront, S3, API Gateway, HITRUST, FERPA
Résumé/CV: https://www.linkedin.com/in/joe-mccormick-76224429/
Email: [email protected]
If you are looking for a consulting- or contract-based resource, I am interested and open to take on projects of many varieties. Over the last 10 years, my professional experience has touched on Education, Professional Consulting, IT Management, E-Commerce, and I hold my MA in English teaching. I have led multiple successful development teams within the companies I have worked at, on projects of large complexity, some with millions of users and in revenue.
As a side project, I created https://awayto.dev, a free open source web application generation platform. It uses React, Redux, Material UI, NodeJS, Typescript, Webpack, Postgres, AWS Cognito, Lambda, CloudFormation, CloudFront, S3, API Gateway, as well as my own custom scripts. Awayto makes it fast to deploy low-cost web applications and then have a skilled developer come in and build up your application.
Thank you for your time.
quickjs-emscripten
-
New QuickJS Release
Based on your comment below I think you figured out the difference - but if you're looking to execute JS, you can pick between ShadowRealm (where available, or using a polyfill) or my library quickjs-emscripten.
Pros of quickjs-emscripten over ShadowRealm:
- You can use quickjs today in any browser with WASM. ShadowRealm isn't available yet, and polyfills have had security issues in the past. See https://www.figma.com/blog/an-update-on-plugin-security/
- In ShadowRealm eval, untrusted code can consume arbitrary CPU cycles. With QuickJS, you can control the CPU time used during an `eval` using an [interrupt handler] that's called periodically during the eval.
- In ShadowRealm eval, untrusted code can allocate arbitrary amounts of memory. With QuickJS, you can control both the [stack size] and the [heap size] available inside the runtime.
- quickjs-emscripten can do interesting things with custom module loaders and facades that allow synchronous code inside the runtime to call async code on the host.
Pros of ShadowRealm over QuickJS:
- ShadowRealm will (presumably?) execute code using your native runtime, probably v8, JavaScriptCore, or SpiderMonkey. Quickjs is orders of magnitude slower than JIT'd javascript performance of v8 etc. It's also slower than v8/JSC's interpreters, although not by a huge amount. See [benchmarks] from 2019.
- You can easily call and pass values to ShadowRealm imported functions. Talking to quickjs-emscripten guest code requires a lot of fiddly and manual object building.
- Overall the quickjs(-emscripten) API is verbose, and requires manual memory management of references to values inside the quickjs runtime.
[interrupt handler]: https://github.com/justjake/quickjs-emscripten/blob/main/doc...
[stack size]: https://github.com/justjake/quickjs-emscripten/blob/main/doc...
[heap size]: https://github.com/justjake/quickjs-emscripten/blob/main/doc...
[benchmarks]: https://bellard.org/quickjs/bench.html
-
Extism Makes WebAssembly Easy
The thing I want to achieve with WebAssembly is still proving a lot harder than I had anticipated.
I want to be able to take strings of untrusted code provided by users and execute them in a safe sandbox.
I have all sorts of things I want this for - think custom templates for a web application, custom workflow automation scripts (Zapier-style), running transformations against JSON data.
When you're dealing with untrusted code you need a really robust sandbox. WebAssembly really should be that sandbox.
I'd like to support Python, JavaScript and maybe other languages too. I want to take a user-provided string of code in one of those languages and execute that in a sandbox with a strict limit on both memory usage and time taken (so I can't be crashed by a "while True" loop). If memory or time limit are exceeded, I want to get an exception which I can catch and return an error message to the user.
I've been exploring options for this for quite a while now. The furthest I've got was running Pyodide inside of Deno: https://til.simonwillison.net/deno/pyodide-sandbox
Surprisingly I've not found a good pattern for running a JavaScript interpreter in a WASM sandbox yet. https://github.com/justjake/quickjs-emscripten looks promising but I've not found the right recipe to call it from server-side Python or Deno yet.
Can Extism help with this? I'm confident I'm not the only person who's looking for a solution here!
-
Node on Web. Use Nodejs freely in your browser with Linux infrastructure.
"Safely execute untrusted Javascript in your Javascript, and execute synchronous code that uses async functions" quickjs-emscripten, NPM
-
Sandboxing JavaScript Code
This maybe, as a start?
https://github.com/justjake/quickjs-emscripten
-
Hacker News top posts: Nov 20, 2022
QuickJS Running in WebAssembly\ (17 comments)
-
QuickJS Running in WebAssembly
The library was inspired by Figma’s blog posts about their plug-in system: https://github.com/justjake/quickjs-emscripten#background
-
Show HN: Run unsafe user generated JavaScript in the browser
If you need to call into user-generated Javascript synchronously or have greater control over the sandbox environment, you can use WebAssembly to run a Javascript interpreter: https://github.com/justjake/quickjs-emscripten#quickjs-emscr...
QuickJS in WebAssembly is much slower than your browser's native Javascript runtime, but possibly faster than async calls using postMessage. As an added bonus, it can make async functions in the host appear to be synchronous inside the sandbox using asyncify: https://emscripten.org/docs/porting/asyncify.html.
-
Why Would Anyone Need JavaScript Generator Functions?
You can use One Weird Trick with generator functions to make your code "generic" over synchronicity. I use this technique to avoid needing to implement both sync and async versions of some functions in my quickjs-emscripten library.
The great part about this technique as a library author is that unlike choosing to use a Promise return type, this technique is invisible in my public API. I can write a function like `export function coolAlgorithm(getData: (request: I) => O | Promise): R | Promise`, and we get automatic performance improvement if the user's function happens to return synchronously, without mystery generator stuff showing up in the function signature.
Helper to make a function that can be either sync or async: https://github.com/justjake/quickjs-emscripten/blob/ff211447...
Uses: https://cs.github.com/justjake/quickjs-emscripten?q=yield*+l...
-
Why Am I Excited About WebAssembly?
This seems like a pretty nice, recently enabled way of getting a sandboxed js environment: QuickJS compiled to WASM: https://github.com/justjake/quickjs-emscripten.
What are some alternatives?
spicedb - Open Source, Google Zanzibar-inspired permissions database to enable fine-grained access control for customer applications
wasmtime - A fast and secure runtime for WebAssembly
nextjs-tailwind-ionic-capacitor-starter - A starting point for building an iOS, Android, and Progressive Web App with Tailwind CSS, React w/ Next.js, Ionic Framework, and Capacitor
wasmer - 🚀 The leading Wasm Runtime supporting WASIX, WASI and Emscripten
php - 🐘 PHP Runtime for ▲ Vercel Serverless Functions (support 7.4-8.3)
wizer - The WebAssembly Pre-Initializer
futurecoder - 100% free and interactive Python course for beginners
rr - Record and Replay Framework
Personal-Site-Gourav.io - My personal site & blog made with NextJS, Typescript, Tailwind CSS, MDX, Notion as CMS. Deployed on Vercel : https://gourav.io
go - The Go programming language
todomvc - Helping you select an MV* framework - Todo apps for React.js, Ember.js, Angular, and many more
iPlug2 - C++ Audio Plug-in Framework for desktop, mobile and web