[HN Gopher] Spin 2.0 - open-source tool for building and running... ___________________________________________________________________ Spin 2.0 - open-source tool for building and running WASM apps Author : acifani Score : 115 points Date : 2023-11-04 12:01 UTC (10 hours ago) (HTM) web link (www.fermyon.com) (TXT) w3m dump (www.fermyon.com) | matei_radu wrote: | Hi, everyone, I'm one of the Spin maintainers. | | We're really excited about the new release, happy to answer | questions about it! | jedisct1 wrote: | How to use Spin with Zig? | matei_radu wrote: | Hey, jesdict1! | | Check out this community project that adds support for Zig -- | https://github.com/tensorush/zig-spin. | tipiirai wrote: | Congrats on the release! Any example sites where Spin is in | active use? | matei_radu wrote: | Thank you! | | (disclaimer: I work at Fermyon, the company that created | Spin.) | | All of Fermyon's websites are powered by Spin, and there are | quite a few users who are deploying their Spin applications | to Fermyon Cloud. | rockwotj wrote: | Congrats on the release! | | Question how did you come up with your the languages you | support. Obviously how well the language compiles to Wasi is a | factor, but how did you end up picking C# for instance? | | Additionally how does Javascript support work? Are you | embedding QuickJS? | matei_radu wrote: | Thank you! | | To your point, the primary consideration for choosing the | languages is their support for WebAssembly, and WASI in | particular. | | Due to Spin's heavy use of WASI and the component model, | languages that have first party support in the WIT bindings | generator (https://github.com/bytecodealliance/wit-bindgen) | are the easiest to implement, followed by languages that can | be built on top of the support for those with first party | support. | | For example, the JavaScript support is built by embedding | QuickJS (in particular, Shopify's Javy project -- | https://github.com/fermyon/spin-js-sdk), which then uses the | Rust SDK. (As a side note for the JS support -- adapting | QuickJS has been extremely helpful in getting JS support out; | however, we are in the process of rebuilding the JS runtime | using SpiderMonkey (with which a few people on the team have | significant experience) and JCO | (https://github.com/bytecodealliance/jco), and the web | platform compatibility makes it a significantly better | proposition for things like 3rd party dependencies). | | C# is an interesting one -- the .NET team at Microsoft (and | in particular Steve Sanderson from that team) has been making | tremendous progress in ahead-of-time compilation for .NET and | generating Wasm and WASI compatible binaries (as opposed to | their initial approach on Blazor), and experimenting with | that led us to build support for Spin as well. | | Finally, we do a lot to support other popular languages and | their Wasm support -- two examples: Python | (https://github.com/bytecodealliance/componentize-py) and | Java / TeaVM (https://github.com/fermyon/teavm-wasi), for | which we haven't fully integrated Spin support, but we hope | to get there soon. | | I hope this explains a bit our process on language support, | happy to expand on any point here. Enjoy your weekend! | evntdrvn wrote: | yeah Steve Sanderson is a force :) | neophyt3 wrote: | Hi Matei_Radu, Is it possible for spin to support actor-model | pattern for eg. can it run long running process to execute | trading strategies which will accept tick data every second | jtflynnz wrote: | Very intriguing, great work and thanks for sharing! | matei_radu wrote: | Thank you for the kind words! | _a_a_a_ wrote: | Ahem? "Spin is a widely used open-source software verification | tool" | | and it's been around a long time | | "The tool was developed at Bell Labs in the Unix group of the | Computing Sciences Research Center, starting in 1980, and has | been available freely since 1991" | | http://spinroot.com/ | theamory wrote: | Ha, naming is tough! At least it's not named Atlas :) | notum wrote: | Allow me to introduce you to Watergate, our new dam | simulation platform. | 9dev wrote: | I wonder if we're at a point where it doesn't really make sense | anymore to insist on unique names. Most of the good ones have | been used by now; and this likely won't get better as more time | passes. | slimsag wrote: | It's a solved problem, and it's called trademark law / a | wordmark. | rubyfan wrote: | If you've been through the process of naming something that | is safe for trademark purposes then you might think we're | beyond unique names for things. We're out of options. | 9dev wrote: | Well it's certainly not solved by trademark law for me, a | lowly software engineer, trying to pick a rememberable name | for my open source project that'll _maybe_ grow into | something bigger someday. | luismedel wrote: | I still have to try wasm, but I see the main focus seems to be on | cloud and edge deployments. | | What I'd really like would be to program a game in C (or classic | Turbo Pascal) and have a way to run it "hosted" in a iOS, Android | or <whatever platform> native app. Is that possible nowadays? | kvdveer wrote: | Someone would need to implement a library to abstract away the | differences between all of these platforms, like Spin does for | server software. | | I'm not aware of a tech stack that does that. | syrusakbary wrote: | WASIX might come in handy for that! | | https://wasix.org | trealira wrote: | I also replied to OP, but SDL is popular for this. | | https://www.libsdl.org/ | trealira wrote: | You could write it using SDL2, a popular C library. They say | the support iOS and Android: | https://wiki.libsdl.org/SDL2/Installation | jokoon wrote: | how can I call a js function from wasm? ___________________________________________________________________ (page generated 2023-11-04 23:00 UTC)