As announced on the 2023-06-20 Community Call, this release includes preliminary support for Wasm. It also includes a number of bug fixes, and a couple of builtin API additions.
Thank you to @4ad, @chee-zaram, @eraserhd, @ghostwheel42, @mpvl, @mvdan, @myitcv, @rogpeppe, and @toshi0607 for contributing to this release!
Language
No changes to note. There are various bug fixes related to required fields, which were first introduced and explained in the v0.6.0-alpha.1 release.
API
No changes to note.
Project
No changes to note.
Core Evaluator
Whilst it should not be a breaking change from a CUE perspective, we have upgraded to use github.com/cockroachdb/apd/v3
. We have also increased apd.Context
precision from 24 to 34.
Encoders
No changes to note.
Builtins
The following four functions have been added to the net
package:
PathEscape
PathUnescape
QueryEscape
QueryUnescape
Thanks to @eraserhd for this change.
cmd/cue
https://cuelang.org/cl/555576 fixed an important bug where cmd/cue vet
was not properly consuming all input data.
Spec
Various bug fixes, with special thanks to @nicuveo for raising many of these.
WebAssembly (Wasm)
We have added preliminary support for Wasm. Users can compile code from any language and toolchain that supports Wasm into plugins that are dynamically loaded by CUE. Users can then call and use functions from these Wasm modules, just like they can use standard library functions.
See the documentation at cuelang.org/go/cue/interpreter/wasm to learn more about Wasm and its current limitations.
Changelog
- internal/ci: bump Go and GoReleaser prior to alpha.2 by @mvdan in b6a32da
- correct misleading phrases in documentation by @chee-zaram in 0755dc8
- internal/core/export: avoid panics on computed comprehensions by @mvdan in 6db2253
- internal/core/adt: return from Accept earlier for hidden fields by @mpvl in c724eef
- cue/ast: fix staticcheck warnings by @mvdan in cc6b544
- internal/core/adt: add missed error by @mpvl in 19749aa
- internal/core/adt: fail on missing required field in comprehension by @mpvl in a991bd6
- cue: allow iterating hidden fields and definitions of embedded scalars by @mpvl in de44cab
- internal/core/adt: add position for required field error by @mpvl in 452e143
- internal/core/validate: allow required fields in definitions by @mpvl in 317f88d
- cue/ast: support specifying required fields in NewStruct by @mpvl in 1432683
- tools/flow: check cycle marker by @mpvl in 9a566ed
- spec: add definition for dynamic fields by @mpvl in 3a635fc
- spec: various fixes by @mpvl in e46324e
- cmd/cue: properly consume all data input in vet by @mvdan in b22ec6a
- cmd/cue: add AllocBytes and AllocObjects to stats by @mvdan in 03d85b8
- increase apd.Context precision from 24 to 34 by @mvdan in 7bcbcd6
- update to cockroachdb/apd v3 by @mvdan in 4728223
- cue: add a "decimal" benchmark by @mvdan in f3be10a
- deps: switch to use quicktest instead of testify by @myitcv in 12908b3
- cue/testdata: add regression test for #2244 by @mvdan in 442c023
- internal/cuetest: remove support for CUE_LONG by @mvdan in cb461fd
- all: sed-replace all trivial uses of ioutil by @mvdan in f56ccf0
- pkg/path: remove unused code by @rogpeppe in ab48c0f
- encoding/protobuf/jsonpb: remove unused code by @rogpeppe in b2476bd
- encoding/protobuf: remove unused code by @rogpeppe in b41f26f
- tools/fix: remove unused code by @rogpeppe in 1f888b5
- all: use strings.Builder in a few more places by @mvdan in 97cba0b
- internal/encoding: remove unused code by @rogpeppe in 251790e
- encoding/openapi: remove unused code by @rogpeppe in 36645d1
- all: go fix to remove old build tags by @mvdan in 8868ae6
- internal/ci: trigger Unity on master as porcuepine by @mvdan in 2148aed
- internal/ci: remove cue-unity/unity from codereview.cfg by @mvdan in c341427
- internal/core/conver: make use of reflect.Value.IsZero by @mvdan in 5318af1
- internal/ci: further tidy up by @myitcv in 82f96c5
- cue/interpreter/wasm: add user-level docs by @4ad in 40fb30d
- cue/interpreter/wasm: add Wasm support for abi=c by @4ad in 0520a3f
- internal/pkg: move pkg/internal to internal/pkg by @4ad in 88922d1
- codereview.cfg: add cue-unity-new by @mvdan in a670427
- doc/tutorial: fix typo by @toshi0607 in 2304cb5
- cue/load: replace go-internal/semver with x/mod by @mvdan in 6c92698
- internal/cuetxtar: print error details by @rogpeppe in 80d6ea0
- tools/flow: support tasks inside slices by @rogpeppe in 6e0366f
- internal/core/convert: split the cue tag commas after the last quote by @ghostwheel42 in 49a64f4
- pkg/net: add Path{E,Une}sape and Query{E,Une}scape by @eraserhd in 9082446
- cmd/cue: refactor our use of cobra by @mvdan in 59080b6
- cmd/cue: do not defer closing files in fmt's loop by @mvdan in 7f79469
- cmd/cue: check all file I/O errors in fmt by @mvdan in 8c6d9ba
- docs/tutorial: revert to using cue eval -i by @myitcv in 5e66c83
- all: move pkg/gen and internal/cmd/qgo to build-ignored files by @mvdan in bad36b2