Comments (3)
You just don't pass --nodejs
and then cargo-web
will try to run them in Chrome/Chromium. (You also need to temporairly comment out the #[cfg(...)]
which prevents them from running, since I haven't yet implemented support for switching on features in cargo-web
.)
Right now it's very hacky which is why it's not done on the CI. In the future I would certainly want to switch to headless Chrome or Firefox, then we can start running them on CI.
As to how hard would it be to support headless Chrome? Well, quite frankly I'm not sure. We'd have to implement the devtools protocol to communicate with it, and we'd have to get precompiled binaries for it from somewhere - probably build them ourselves just as we do for Emscripten (this alone is a huge pain since compiling Chrome takes ages, and the build system is a nightmare to set up).
from stdweb.
What about using an existing node.js headless chrome lib and creating WASM bindings for it's API?
from stdweb.
All of the tests are being run on CI and I've added instructions on how to run them at the end of the README, so closing.
from stdweb.
Related Issues (20)
- Unnecessary recompilation when switching between cargo check and cargo web deploy
- InsertNodeError is private HOT 1
- add_event_listener doesn't support useCapture option
- Add HtmlButtonElement to html_elements mod HOT 3
- How to obtain XmlHttpRequest response outside clousure. HOT 1
- unexpected char in asm const signature 101 HOT 4
- Feature request: Element.{clientWidth,clientHeight}
- Feature Idea: Implementation of CustomEvent?
- Error loading wasm-bindgen-minimal example HOT 1
- Maintenance status? HOT 6
- If I use 'rand' library anywhere before rendering, it renders nothing on the website HOT 2
- please update sha1 to sha-1
- Undefined behavior when creating SerializedValue HOT 4
- Should initialize's panic hook work with a `&str` payload? HOT 1
- linking with `cc` failed: exit code: 1
- Panic on Firefox with Trunk
- `js` macro doesn't work with `wasm-bindgen --target no-modules`
- `RuntimeError: unreachable` when loading `wasm-bindgen-minimal` example in the browser ...
- console! can't work on web front-end page
- Not compiling with newest version of dependencies HOT 4
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 stdweb.