Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prepare basic interface #1

Closed
samlown opened this issue Apr 4, 2022 · 2 comments
Closed

Prepare basic interface #1

samlown opened this issue Apr 4, 2022 · 2 comments
Assignees

Comments

@samlown
Copy link
Contributor

samlown commented Apr 4, 2022

The objective of the GOBL WASM library is to provide a very simple wrapper around a CLI-like interface to the base GOBL library. It should be possible to "Envelop" and/or "Complete" raw JSON documents to create complete GOBL "draft" envelopes as a first step.

We can deal with Digital Signatures a bit later, although they should be relatively easy to manipulate.

@flimzy
Copy link

flimzy commented Apr 8, 2022

There is no clean way to do this with modern Go/WASM. You can see the full discussion here: golang/go#25612

But the current state of affairs is basically that the Go/WASM program has to set functions in the global JS object (aka window). There's no way to "export" functions in a way that can be imported using standard JS semantics.

An alternative might be TinyGo (referenced in the above issue), as it does provide this sort of exportability for the WASM target. TinyGo has a number of limitations, similar to GopherJS, but I haven't tried using it yet, so maybe it wouldn't be a problem for us.

@flimzy
Copy link

flimzy commented Apr 8, 2022

Also, just FYI, the compiled output of gobl as WASM is 17mb, even if we can make this work. That's seems like a fairly hefty JS dependency...

@flimzy flimzy closed this as completed May 31, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants