Open symil opened 3 years ago
Big parts of vlib and V UI are not yet ready for the JS backend
@playXE
This one for sure will not be able to fix in close future. C FFI is required to run gg
module which requires us to use node-ffi module or extend NodeJS with pre-compiled dynamic library.
the goal is to make gg
work inside the browser by rendering to a canvas
.
@spaceface777 running gg in browser should be easier but we still need to run it on the Node backend too.
@spaceface777 running gg in browser should be easier but we still need to run it on the Node backend too.
Curious why you would want to run gg on the Node backend? It makes sense for sake of consistency, but if you want a backend/desktop application why not just compile to an executable and call it done? Why does Node matter especially since Node doesn't actually have any built in functionality for graphics? You're essentially compiling to js so js (Node) can call C instead of just compiling directly to C. I'm guessing there is a valid reason you'd want to do this but I have no idea what it is, aside from consistency in the JS backend's functionality across Node and the browser
The CI runs tests on the js backend using node, so it needs to work with node for that reason.
Personally, I'd rather see node go the way of the dodo, but it's not my call.
Hi @symil, that example doesn't exists anymore, can you send a code to try to replicate?
Hello, unfortunately it's been years and I don't have the code on my machine anymore 🙁
I just installed v and ran the
counter
example of theui
library. It works when I run it withv run counter.v
, but fails when I try to compile it to Javascript withv -o counter.js counter.v
with the error:(it also gives me a ton of warnings)
Output of
v doctor
: