Comments (4)
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 supportswasm32-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.
Just a small update: this will be resolved in v0.3 (already works in our private branch).
from asynchronix.
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.
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)
- recursive self-scheduling HOT 3
- Cancellation of event scheduled for the current time is cumbersome
- Missing functionality: scheduling periodic events
- Lack of support for real-time execution
- Delayed outputs? HOT 3
- Providing an example with network integration and multithreading HOT 17
- New Clock abstraction is not Sendable HOT 1
- Type erased address type HOT 2
- Implement InputFn for a higher amount of input arguments HOT 4
- Add optional serde feature HOT 2
- Add helper function to get chrono::DateTime from MonotonicTime HOT 9
- How to cleanly abort a simulation? HOT 5
- Cycle detection HOT 3
- Ensuring determinism with periodics HOT 9
- Panic when trying to iterate over empty EventStream HOT 6
- A question about the mt_executor logic HOT 2
- Examples aren't up-to-date in 0.2.3 HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from asynchronix.