Comments (4)
the standard golang WASM uses a ton of ram.
I have been using tinyGO that has WAMS support.
https://github.com/aykevl/tinygo/tree/master/src/examples/wasm
Tinygo is amazing... Really should try it.
Also i was thinking that running the golang WASM code inside WebWorkers is a smart way to go, so that the GUI thread is freed up. Anything you built you would want to be that way.
Also its follows the architectural patterns because its pure message passing between the WebWorkers and the main Window and its all asynchronous.
Basic overview here: https://blog.sessionstack.com/how-javascript-works-the-building-blocks-of-web-workers-5-cases-when-you-should-use-them-a547c0757f6a
This would allow people to build HTML GUI apps with shenzen and have all the logic inside the Webworkers doing whatever pipelines are needed. The GUI would be updated based on the results of any computation.
i would consider using a dependency on CommLink also to abstract it a little. But it might be overkill too. Commlink handles the aspects of communication between the Window and the Webworkers.
https://github.com/GoogleChromeLabs/comlink
from shenzhen-go.
For now I'm more concerned that GopherJS might become unusable - e.g. gopherjs/gopherjs#855 means that to rebuild the client one can't be doing things the module way. It's another command that needs to be installed locally, but Go WASM has the benefit of being built into Go.
TinyGo is promising. I think some Go features are in use that TinyGo isn't supporting yet, so we'll see.
from shenzhen-go.
A few days ago I started experimenting in the wasm branch. After many minor code fixes, it compiles and runs up to the point of displaying a graph. Sadly UI interaction is broken after that point; the client crashes inside github.com/johanbrandhorst/protobuf which is still based on GopherJS. From a very quick look, Johan's packages don't look too difficult to port to syscall/js...
from shenzhen-go.
Good thing I didn't keep going down that path, because of course github.com/johanbrandhorst/grpcweb-wasm-example exists already.
from shenzhen-go.
Related Issues (20)
- Channels should be more like cattle, less like pets HOT 3
- same same but different (flogo) ? HOT 1
- Write & post a design doc
- dev/model/parts: Changes to Code should reflect in diagram HOT 1
- dev/model/parts: Add a part type that can launch a func in an existing file
- dev/model/parts: Update existing parts to new model
- dev: Make prepackaged binaries for common platforms
- dev: Support generating, building/installing, etc from command line
- dev/client: Distinguish inputs and outputs with different shapes
- dev/client: Make the canvas the right size
- Ideas..... HOT 2
- graphing package HOT 1
- Choreography
- Delete v0 HOT 1
- Add go modules files HOT 1
- why name it shenzhen??? HOT 1
- gui
- get ride of all OS non agnostic code - use Mage instead HOT 1
- Any chance for a maintenance patch? HOT 1
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 shenzhen-go.