Comments (6)
Hi @tdewolff. It would be great if TinyGo was supported by xdg (and implicitly by sysfont). However, I think it might be better to raise the issues on the TinyGo repository. It would certainly avoid a lot of workarounds on my part in order to make it work.
From what I can tell, two of the three issues you mentioned are already in work there:
ModeDir not declared by package os
: there's already an issue for this (tinygo-org/tinyfs#4) and a PR (tinygo-org/tinygo#1903) which has been merged already.
Getuid not declared by package os
: there's already an issue for this one as well (tinygo-org/tinygo#1886) and a PR (tinygo-org/tinygo#1892) which will hopefully be merged soon.
So there's only MkdirAll not declared by package os
left. Maybe @gedw99 can open an issue there regarding this because it's not specific to the xdg library.
Are these issues on Go 1.16 only or does this reproduce with Go 1.15 as well?
from sysfont.
Hey Adrian, thanks for the quick and in-depth response. I agree this would be better to take up with TinyGo!
from sysfont.
"So there's only MkdirAll not declared by package os left ..."
Some ideas on this:
- Virtualise the OS file system using indexdb as the base store.
https://github.com/JohnStarich/go-wasm/blob/master/internal/js/fs/mkdir.go
Johns project wraps the golang file OS with a indexdb based implementation, allowing golang wasm to work.
He uses file embeded at compile time to put the golang src code into the system it seems.
This is not what we want though i think. As what you want is to be able to see if the fonts are on the real OS the browser is running on right ?
Yep its crazy but thats the golang src files, sitting there in indexdb.
- this supports Mkdir: tinygo-org/tinyfs#5
Not sure if this is a viable option for the sysfont project though.
from sysfont.
Hmm there is also this
https://web.dev/file-system-access/#storing-file-handles-or-directory-handles-in-indexeddb
from sysfont.
BTW added "no-debug" flag sometimes helps things work
For example:
tinygo build -o wasm.wasm -target=wasm -no-debug -tags=example ./examples/2048/
from sysfont.
tinygo now supports os.MkdirAll().
The next problem blocking "tinygo test" from working in sysfont seems to be unsupported uses of reflect in testify and go-spew, see
tinygo-org/tinygo#2650
tinygo-org/tinygo#2649
from sysfont.
Related Issues (6)
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 sysfont.