HackerTrans
TopNewTrendsCommentsPastAskShowJobs

bhelx

no profile record

Submissions

Back of the Napkin WASM Performance: How Does Extism Work?

dylibso.com
9 points·by bhelx·2 năm trước·2 comments

comments

bhelx
·2 tháng trước·discuss
Agree about Graal being really good. there are some different use cases for embedding wasm in an application. chicory / endive is not just for embedding another language. the main use case was always secure plugin-systems. but there are other use cases. also it's not controlled by Oracle and works well outside of their ecosystem, which i think some people value. this question came up a few times and were addressed in talks and blog articles:

https://github.com/dylibso/chicory#on-the-press
bhelx
·2 tháng trước·discuss
the "redline" compiler is cranelift which is written in rust, but i think it's being compiled to Wasm first then JVM bytecode so it still works zero dependency. not sure if that will continue to be the case.
bhelx
·2 tháng trước·discuss
if i understand correctly, the new redline compiler doesn't have these limitations. it's not based on asm. (edit: but this hasn't been merged to mainline yet)
bhelx
·2 tháng trước·discuss
yeah that is roughly the concern, many runtimes didn't want to continue on past wasip1, mostly because of the component model.
bhelx
·4 tháng trước·discuss
Just wanted to chime in to say this is really cool. I dreamed of building something like this for the Extism ecosystem but it was a huge lift to unlock all the pieces. This looks like lots of innovation all the way down the stack. Kudos!
bhelx
·năm ngoái·discuss
Glad to hear you’re enjoying it! Would love to meet up some time if you ever get the chance.
bhelx
·năm ngoái·discuss
welcome! if you're looking for some people to connect to or get help from check out the local dev community site: http://noladevs.org/
bhelx
·năm ngoái·discuss
yes, the local security community punches above their weight i think.
bhelx
·năm ngoái·discuss
Hack night is the generic networking meetup at the rusty nail. It's way more casual. No presentations or organizing. below-c-level and frontend party are generally more organized and have talks. All the meetups happen before (and geographically near) to hack night on the same night. So you can generally do both. See a meetup then walk to the bar with everyone for the networking event.
bhelx
·năm ngoái·discuss
Speaking of community, there is a really nice little tech community going strong in New Orleans that I think reflects the culture talked about here. If you are ever in town you should stop by an event https://www.noladevs.org/.

Feel free to reach out to me if you want some intros.
bhelx
·năm ngoái·discuss
This is the first i've heard of people using the SSE transport locally. What purpose what that serve? Is this by design because the chrome extension could not talk to it otherwise?

BTW, you should really run your MCP servers in a sandboxed environment, esp if they don't need to do things like `exec` or read from the filesystem. We do this with the https://mcp.run ecosystem by wrapping them in wasm. Because they are wasm you could also run them right in the chrome extension!
bhelx
·năm ngoái·discuss
I'm not sure where they congregate, but I've encountered some minecraft people using chicory probably for this purpose. IDK how minecrafts plugins currently work but i'd imagine chicory is more secure and the overhead may be worth it for some cases.
bhelx
·năm ngoái·discuss
Glad you appreciate it! On top of being a Java joke it’s an homage to my home, New Orleans. We still drink coffee with chicory here due to some events during the civil war and then a changed cultural taste. Though the history in this isn’t exactly clear I think https://neworleanshistorical.org/items/show/1393
bhelx
·năm ngoái·discuss
wait, was the question running scala in wasm or running chicory in scala?
bhelx
·năm ngoái·discuss
Yes i think so. it's just a jar
bhelx
·năm ngoái·discuss
This is distributed as just a jar, should you can invoke it from Clojure, if that is what you mean.
bhelx
·năm ngoái·discuss
Some more interesting use cases in production:

Running python UDFs in Trino: https://trino.io/docs/current/udf/python.html

Running the Ruby parser in Jruby: https://blog.enebo.com/2024/02/23/jruby-prism-parser.html
bhelx
·năm ngoái·discuss
Even in interpreter mode, rust wasm programs seem very fast for me on Chicory. I'm not sure if we have any specific benchmarks but the graal team did some and i think it's based on a rust guest program https://chicory.dev/blog/chicory-1.0.0/#the-race-day
bhelx
·năm ngoái·discuss
WASI does open up some holes you should be considerate of. But it's still much safer than other implementations. We don't allow you direct access to the FS we use jimfs: https://github.com/google/jimfs

I typically recommend people don't allow wasm plugins to talk to the filesystem though, unless they really need to read some things from disk like a python interpreter. You don't usually need to.
bhelx
·năm ngoái·discuss
There are a few! But also there is lots of Java software out there and Wasm is a great way to extend it and bring new functionality.