Skip to content
This repository has been archived by the owner on Jul 1, 2022. It is now read-only.

Can be used in Browser or only on server with nodejs ? #1

Closed
joe-getcouragenow opened this issue Jul 1, 2020 · 4 comments
Closed

Comments

@joe-getcouragenow
Copy link

Just wondering..

@asdine
Copy link
Member

asdine commented Jul 2, 2020

The end goal is to be able to use it on both platforms but my first goal is to be able to use it on the browser with wasm.
For NodeJS I don't know yet if we'll create a separate node-genji repository or store the code in this one. The main difference between the Node version and the wasm one would be mainly that the former would use a shared C library and the latter will use the wasm version.

@joe-getcouragenow
Copy link
Author

joe-getcouragenow commented Jul 2, 2020

Ok thanks for the response.

My goal is also to be able to use it in a browser as WASM.

I could not compile genji using the standard golang wasm compiler.
Any chance you can update the readme / makefile for us mortals, and with a basic JS test harness calling it =

Regarding gotiny, I did notice that the comments you left in the code pointing to Issues with gotiny have been fixed. At least the first 2 Issues i saw in your code.
Search: https://github.com/genjidb/genji/search?q=tinygo&unscoped_q=tinygo
fixed 5 days ago: tinygo-org/tinygo#1034
fixed a few months ago: tinygo-org/tinygo#1033

Also, this golang project has managed to get tinygo to work for it.
https://github.com/vugu-examples/tinygo
It worked for me and runs fine in the browser :) And its tiny !
Here is my makefile: https://codeberg.org/gerard.webb/junk/src/branch/master/sdk/gui/vugo

@asdine
Copy link
Member

asdine commented Jul 3, 2020

The latest release of Tinygo doesn't yet contain all of the fixes and most importantly it contains some other bugs that need to be addressed (tinygo-org/tinygo#1206)

Concerning genji.js, I still need to write an indexeddb engine, because the current engine stores all the data in memory, which is not ideal.

I will push a fix for the current version this weekend though, so that you can test it if you're interested 👍

@joe-getcouragenow
Copy link
Author

joe-getcouragenow commented Jul 11, 2020

Yep i am def interested in trying to get things working in the Browser . Thanks.

Btw, this is an excellent example of how useful Genji is: https://github.com/google/note-maps/blob/main/notes/genji/genji.go#L24
Its not running at the moment, but the intent of the architecture shows of its clean usefulness.

@asdine asdine closed this as completed May 1, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants