Git Product home page Git Product logo

Comments (4)

leon-thomm avatar leon-thomm commented on September 24, 2024 1

There is, however, a plan to provide a dedicated single-threaded simulator with !Sync channels and tasks. [...] it would certainly make sense to ensure it supports wasm32-wasi out of the box.

That sounds great.

I am very curious about your use-case: are you at the liberty to share why you wish to run Asynchronix on a wasm target?

For portability. I recently wrote a tiny cache coherence simulator with several parameters (block size, replacement policy, etc.), and it turned out useful that I could simply compile it to wasm32-wasi and send the .wasm file to my peers, who can run small benchmarks with their own configurations in an arbitrary environment (with quite reasonable performance, actually). But I understand that this might not be top of the agenda.

from asynchronix.

sbarral avatar sbarral commented on September 24, 2024 1

Just a small update: this will be resolved in v0.3 (already works in our private branch).

from asynchronix.

sbarral avatar sbarral commented on September 24, 2024 1

Done, courtesy of #24! 🎉

In fact it is now even possible to use the simulator API from the JS side via protobuf messages, but this is for now a somewhat experimental feature. There is sadly no JS library to abstract the protobuf layer at the moment, so one must perform (de)serialization in JS based on the simulation.proto schema, for instance with protobuf.js.

This won't make its way to crates.io before v0.3 is officially published though.

from asynchronix.

sbarral avatar sbarral commented on September 24, 2024

I admit I have no experience with wasm targets, but my guess is that supporting wasm with the current multi-threaded executor architecture would be difficult. As you noted, even in single-threaded mode, 1 worker thread is always spawned from the main executor thread and changing this behavior would be a major change.

There is, however, a plan to provide a dedicated single-threaded simulator with !Sync channels and tasks. The primary motivation for this is to eliminate atomic synchronization overhead for light workloads that do not benefit from parallel execution, but it would certainly make sense to ensure it supports wasm32-wasi out of the box. I can't give any horizon for this though, it is only a medium-level priority at the moment.

I am very curious about your use-case: are you at the liberty to share why you wish to run Asynchronix on a wasm target?

In any case, I will leave this issue open to ensure it is not forgotten when work on a single-threaded simulator begins.

from asynchronix.

Related Issues (18)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.