JavaScript package for CUE using wasm #952
Replies: 2 comments 2 replies
-
@codewithcheese out of interest, how do you plan to version this? Because there are effectively two relevant versions that compose into the output: the Go version you used to build the WASM artefact, and the CUE version. On top of that you've got your "version" which effectively represents the progression of API you are establishing in your package. I just wonder how this scales as there are more Go versions, more CUE versions... and your API could change too? |
Beta Was this translation helpful? Give feedback.
-
This discussion has been migrated to cue-lang/cue#952. For more details about CUE's migration to a new home, please see cue-lang/cue#1078. |
Beta Was this translation helpful? Give feedback.
-
Hi CUEbies
I have created a npm packages for using CUE in node.js and browsers: https://www.npmjs.com/package/cuelang-js
It compiles the CUE cli to wasm and exports a function for calling commands along with providing arguments and flags. In node.js it reads from the local file system, in browser CUE reads and writes from an in-memory file system.
The CUE wasm is 26MB uncompressed using gzip its down to 4MB still a bit large for websites.
We at balena are starting to use CUE in many places. One of them is to replace JSON Schema for validation.
If you make use of the package feel free to drop me a note here, happy to accept issues and PRs on the repo.
Beta Was this translation helpful? Give feedback.
All reactions