WASM persistent storage

387 views
Skip to first unread message

Luis Furquim

unread,
May 12, 2019, 7:56:49 AM5/12/19
to golan...@googlegroups.com
Hello,

Is it possible to persist files when using Golang/WASM on a browser? I found this page https://uncovergame.com/2015/06/06/persisting-data-with-emscripten/ showing explaining how to do it using C+EMScripten, but I couldn't find an example or documentation in Go. The page doesn't explicit if it does it through wasm, but I think it is implied. If it is really possible, someone knows how to do it from Go and point me to some documentation?

Thank you in advance.

--
Luis Otavio de Colla Furquim

Agniva De Sarker

unread,
May 12, 2019, 6:22:01 PM5/12/19
to golang-nuts
There is no file I/O in the browser using Go wasm yet. Please see https://github.com/golang/go/issues/26051

Luis Furquim

unread,
May 12, 2019, 8:37:16 PM5/12/19
to golang-nuts
Hello Agniva!

Thanks for the clarification! If I clearly understood the discussion on that issue, there is no current work to implement file I/O nor there are plans to do it in the near future. Do I understand it correctly? If so, the solution should be calling JS to persist the data?

Again, thanks for your attention,
Luis Otavio

Agniva De Sarker

unread,
May 13, 2019, 11:31:48 AM5/13/19
to golang-nuts
As of now, it is open for anybody to investigate and work on it. Until then, calling JS is the best way to go.

-Agniva

Luis Furquim

unread,
May 13, 2019, 2:05:01 PM5/13/19
to Agniva De Sarker, golang-nuts
Ok! Again, thanks for your attention!


--
You received this message because you are subscribed to a topic in the Google Groups "golang-nuts" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/golang-nuts/qcGMbxiHP08/unsubscribe.
To unsubscribe from this group and all its topics, send an email to golang-nuts...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/cc957d51-744b-4538-86e5-8406f4dea51b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages