Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
199 commits
Select commit Hold shift + click to select a range
dc122d0
perf(buffer): elide redundant bounds checks on guarded append paths
Yu-zh Aug 14, 2026
828a877
bench(buffer): measure only the append loop
Yu-zh Aug 14, 2026
0be97c7
bench(buffer): keep the buffer, not its length
Yu-zh Aug 14, 2026
10f02af
fix(bigint): validate length before the zero shortcut in js to_octets
bobzhang Aug 15, 2026
cc44306
fix(bigint): correct to_uint/to_uint64 truncation of large negatives
bobzhang Aug 15, 2026
609b76e
test(bigint): add deep QuickCheck arithmetic properties
bobzhang Aug 14, 2026
c5772c8
test(encoding/utf8): add a spec-oracle QuickCheck suite
bobzhang Aug 15, 2026
2b2169f
test(range): specify iter against an exact-arithmetic oracle
bobzhang Aug 15, 2026
25cbc5a
test(lazy_list): add extensional and intensional QuickCheck specs
bobzhang Aug 15, 2026
8aa2d6b
test(internal/edit_distance): specify Levenshtein against the textboo…
bobzhang Aug 15, 2026
882436d
test(encoding/utf16): add a differential spec suite for both decoders
bobzhang Aug 15, 2026
60d0ebc
fix(lazy_list): make concat stack-safe under any nesting
bobzhang Aug 15, 2026
4290b56
test(internal/strconv): specify the parsers against independent oracles
bobzhang Aug 16, 2026
298b811
fix(json): reject unpaired \uXXXX surrogate escapes in strings
bobzhang Aug 15, 2026
df7811f
fix(json): address review feedback on surrogate escape rejection
bobzhang Aug 16, 2026
23cb5ee
fix(json): tighten the surrogate docs and error coverage
bobzhang Aug 16, 2026
7522d79
introduce internal `@os_string` package for string with OS-native enc…
Guest0x0 Aug 13, 2026
e26de0b
fix docstring wording
Guest0x0 Aug 14, 2026
80a311e
refactor: use `[| ... |]` iterator literals across the project
bobzhang Aug 16, 2026
596a4ca
address Codex review
bobzhang Aug 16, 2026
1f4724e
fix(regex): stop applying a sequence's continuation twice (#4075)
bobzhang Aug 17, 2026
400d497
fix regex remove duplicates (#4087)
hackwaly Aug 17, 2026
20c8e5b
fix(immut/vector): a full node that still carries sizes is not radix
bobzhang Aug 16, 2026
c69d109
fix(immut/vector): keep every leaf at the bottom in `from_leaves`
bobzhang Aug 16, 2026
362de03
fix(immut/vector): rebalance must split into as many nodes as it needs
bobzhang Aug 16, 2026
71ebc1a
address Codex review of the rebalance fix
bobzhang Aug 16, 2026
f2164be
docs(immut/vector): write down the RRB representation contract
bobzhang Aug 17, 2026
753fe47
Potential fix for pull request finding
bobzhang Aug 17, 2026
a224b0d
feat(immut/vector_map): add a persistent insertion-ordered map
bobzhang Aug 16, 2026
2bba0e1
docs(immut/vector_map): address review nits
bobzhang Aug 16, 2026
429f4c4
test(immut/vector_map): use the Iter literal for the from_iter case
bobzhang Aug 16, 2026
b52ff59
docs(immut/vector_map): state the cost of every public operation
bobzhang Aug 16, 2026
203ad9c
docs(immut/vector_map): correct the complexity and hashing claims
bobzhang Aug 16, 2026
0f7e825
docs(immut/vector_map): reconcile the reclamation rules across the docs
bobzhang Aug 16, 2026
3e635c3
docs(immut/vector_map): finish reconciling the docs with the code
bobzhang Aug 16, 2026
5141c98
docs(immut/vector_map): account for filter in the reclamation overview
bobzhang Aug 16, 2026
d2a2384
test(immut/vector_map): check the rebuilt index, and correct what the…
bobzhang Aug 16, 2026
f7fec41
docs(immut/vector_map): make the identity guarantee consistent and te…
bobzhang Aug 16, 2026
f524df8
docs(immut/vector_map): give Debug its complexity too
bobzhang Aug 16, 2026
c8ca0cd
test(builtin): document physical_equal's NaN behavior across backends
bobzhang Aug 18, 2026
f8ba84c
test(immut/vector): property-test the shapes `Arbitrary` cannot generate
bobzhang Aug 18, 2026
56f1401
address Codex review
bobzhang Aug 18, 2026
ef4afae
fix(base64): decode from UTF-16 code units, not a byte reinterpretation
Yu-zh Aug 18, 2026
12445e1
feat: shrink instances for more data structures
CAIMEOX Aug 17, 2026
4728bd7
docs(env): migrate README examples from Result[T, String] to raise
bobzhang Jul 15, 2026
397edcb
test/bench: cover the bytes_unsafe intrinsic fallbacks
bobzhang Aug 18, 2026
edf4689
perf: unroll the bytes_unsafe intrinsic fallbacks
bobzhang Aug 18, 2026
89561ac
test: cover all six writers in the neighbour check
bobzhang Aug 18, 2026
6195d11
bench
Yu-zh Apr 23, 2026
92c6578
perf: hash bytes with u32le view patterns
Yu-zh Apr 28, 2026
7c07bfb
Add license header to hash bench
Yu-zh May 8, 2026
0bbe91e
bench: measure Hasher::combine_bytes directly
bobzhang Aug 18, 2026
cb67bcb
refactor(builtin): drop deprecated BytesView byte-order conversions (…
bobzhang Aug 19, 2026
99f83da
fix(regex): reject empty unicode brace escape (#4102)
hackwaly Aug 19, 2026
332111d
perf(sorted_set): use split-based O(n+m) for difference, intersection…
bobzhang Aug 19, 2026
47b8187
test(sorted_set): property-test the split-based set operations
bobzhang Aug 19, 2026
657e8af
refactor(ref): restore the old value with defer in Ref::protect
bobzhang Aug 19, 2026
7c33fe1
refactor(error): drop the catch-all cleanup in the protect design notes
bobzhang Aug 19, 2026
c0c1405
test(char): exercise `utf16_len` directly instead of the deprecated `…
bobzhang Aug 19, 2026
9ee773e
refactor(builtin): remove the deprecated `Show` impl for `Iter2`
bobzhang Aug 19, 2026
6381a37
chore(builtin): regenerate pkg.generated.mbti after removing the Iter…
bobzhang Aug 19, 2026
2de72e7
feat: shrink facade in quickcheck root
CAIMEOX Aug 19, 2026
3bce037
fix(bigint): canonicalize from_octets with leading zero limbs
hyfdev Jul 18, 2026
da66dee
perf(sorted_set): probe fallback for strongly asymmetric difference/i…
bobzhang Aug 19, 2026
b6d1ab8
refactor(test): use `<+` template writing in test files (#4111)
bobzhang Aug 19, 2026
310e2eb
perf(list): single-pass two-pointer has_suffix, rename is_suffix/is_p…
bobzhang Aug 19, 2026
f997206
perf(builtin): pattern-based fast paths for char predicates
bobzhang Aug 20, 2026
fc3f687
refactor(builtin): deprecate `StringBuilder::new` in favor of `String…
bobzhang Aug 20, 2026
cd135b1
fix(builtin): deprecate the `new` alias on the JS StringBuilder too
bobzhang Aug 20, 2026
d8affae
promote 20250819
myfreess Aug 19, 2026
6da28eb
cleanup: merge duplicate match arms, fix wrong docs and messages
bobzhang Jul 16, 2026
7929837
perf(sorted_set): compute union size from split drops instead of reco…
bobzhang Jul 16, 2026
d32cdf1
perf(builtin): aligned fast paths for generic bitstring extraction vi…
bobzhang Aug 20, 2026
fc60104
Add BigInt empty octets tests
bobzhang Jun 29, 2026
58f2f67
test(argparse): split rejected config cases
peter-jerry-ye Jul 7, 2026
3b2e6cb
perf(builtin): count rev_foldi's index up instead of deriving it per …
bobzhang Aug 20, 2026
18d5212
test(argparse): group tests by behavior
peter-jerry-ye Aug 20, 2026
318a6ee
test(argparse): use expect_error
peter-jerry-ye Aug 20, 2026
dc17f50
fix(bigint): treat empty octets as zero in BigInt::from_octets (#4115)
bobzhang Aug 20, 2026
8d6e030
perf(builtin): guaranteed-linear KMP fallback for substring search
bobzhang Aug 20, 2026
93cb4d5
Optimize JSON string escaping
mizchi Jul 3, 2026
ffd67c4
Address JSON escape review comments
mizchi Jul 5, 2026
5ccd4e9
perf(json): vectorize escape precheck
Yu-zh Jul 20, 2026
60adcf7
refactor(json): scope v128 import workaround
Yu-zh Jul 20, 2026
4fd5513
refactor(json): iterate escape code units directly
Yu-zh Jul 20, 2026
6caf8ba
test(json): property-test the escape fast path
bobzhang Aug 20, 2026
f5e7dd6
refactor(json): drop inferable UInt16 ascriptions
bobzhang Aug 20, 2026
de3d231
ci: raise Windows-shared 'run tests' step timeout to 20 minutes
bobzhang Aug 20, 2026
e50d33d
Add Eisel-Lemire decimal parsing fast path (#3957)
Yu-zh Aug 20, 2026
fb3c3bc
perf(string): accelerate ASCII character sets
mizchi Jul 20, 2026
784b387
refactor(string): share ASCII charset construction
mizchi Jul 20, 2026
c34abfb
style(bench): match stable formatter output
mizchi Jul 20, 2026
d8bbd93
perf(builtin): SIMD-accelerate ASCII character set scans
bobzhang Aug 20, 2026
a05af6a
test(builtin): property-test ASCII character set scans
bobzhang Aug 20, 2026
f5efb9b
fix(builtin): keep empty character sets off the SIMD trim path
bobzhang Aug 20, 2026
35ecbc4
perf(ascii): vectorize decode on non-JS targets
mizchi Jul 20, 2026
1d379f6
perf(ascii): inline scalar decode path
mizchi Jul 20, 2026
d679aca
bench(ascii): cover million-byte decode
mizchi Jul 20, 2026
7a5e4d3
chore(ascii): add license headers
mizchi Jul 20, 2026
4e89315
test(ascii): property-test the vectorized decoder
bobzhang Aug 21, 2026
d3130d8
feat(encoding): add hex package (#3625)
bobzhang Aug 21, 2026
02e40a4
perf(hex): vectorize encode/decode on the linear-memory backends (#4122)
bobzhang Aug 21, 2026
9ccffb3
fix(base64): keep the vector fast paths free of wrapping bounds
bobzhang Aug 21, 2026
220d463
feat(hashmap): add FromJson impl for HashMap[String, V] to match Map …
bobzhang Aug 21, 2026
0b8cc6e
feat: unbiased ranged integer generation for splitmix
CAIMEOX Aug 21, 2026
37f2daa
api improve
CAIMEOX Aug 21, 2026
26a7a88
perf(immut): speed up sorted array builders
mizchi Jun 28, 2026
6668d8a
perf(immut): speed up sorted iter builders
mizchi Jun 29, 2026
90065dd
Constrain sorted from_sorted_array constructors
mizchi Jul 1, 2026
e65e541
perf(immut/sorted_map): sort build entries via Compare, not a closure
Yu-zh Jul 5, 2026
9582406
perf(immut): specialize ascending/descending ordered-array builders
Yu-zh Jul 5, 2026
54e8c43
perf(immut): build unsorted maps/sets in place
Yu-zh Jul 5, 2026
c966342
refactor(immut): drop the unchecked from_sorted_array builders
Yu-zh Aug 22, 2026
4d21a80
test(immut/sorted_set): property-test the bulk build dispatch paths
Yu-zh Aug 22, 2026
9518fdf
perf(immut): keep from_iter streaming instead of bulk-building
Yu-zh Aug 22, 2026
71163e4
perf(hashset): probe with unchecked array access
bobzhang Aug 22, 2026
ecfffb4
perf(hashmap): probe with unchecked array access
bobzhang Aug 22, 2026
b42ef3c
bench(hashmap): isolate removal by copying a prebuilt map
bobzhang Aug 22, 2026
4e7043a
perf(set): probe with unchecked array access
bobzhang Aug 22, 2026
a8ba18b
perf(builtin): probe `Map` with unchecked array access
bobzhang Aug 22, 2026
aced026
fix(hashset): make `copy` independent of the original (#4130)
bobzhang Aug 22, 2026
07ebf72
refactor: collapse duplicated helper bodies
bobzhang Aug 23, 2026
16409dd
refactor: use `guard ... is Some(x) else` for early exits
bobzhang Aug 23, 2026
c34157d
refactor: drop unnecessary -deprecated_syntax suppression
bobzhang Aug 23, 2026
dae731c
refactor(quickcheck/splitmix): drop deprecated derive(Show) from Rand…
bobzhang Aug 24, 2026
96a3bf2
Clean up stale #warnings suppressions (#4138)
bobzhang Aug 24, 2026
b91f766
perf(quickcheck): build arbitrary strings linearly (#4148)
mizchi Aug 25, 2026
4ce4c49
fix(js): use FixedArray at JS FFI boundaries returning arrays
bobzhang Aug 25, 2026
4626241
perf(bytes): reuse SIMD lexical comparison
mizchi Aug 24, 2026
6dcfd32
perf(builtin): annotate view and optional access intrinsics
Yu-zh Aug 25, 2026
c65b467
refactor(argparse, debug): use nested list patterns with ArrayView::a…
bobzhang Aug 26, 2026
1153a4f
Tune Lexbuf merging for small retained chunks (#4153)
mizchi Aug 26, 2026
5fc5586
refactor(argparse): use list pattern and split_once in hyphen-value c…
bobzhang Aug 26, 2026
76e82f4
perf(utf8): reduce lossy decode output allocation
mizchi Aug 24, 2026
6deec13
chore(utf8): remove decode_lossy benchmark
peter-jerry-ye Aug 26, 2026
8d00573
feat(deque, queue): support error-polymorphic callbacks
Milky2018 Aug 26, 2026
9907f09
test(deque, queue): cover error-polymorphic callbacks
Milky2018 Aug 26, 2026
5aafbf6
style(deque, queue): apply CI formatting
Milky2018 Aug 26, 2026
39055be
perf(bytes): write escaped hex digits directly
mizchi Aug 24, 2026
3fa9151
fix: overflow in immut/vector near int max
CAIMEOX Aug 24, 2026
9984a04
promote 20250827
myfreess Aug 27, 2026
2cd1eaf
fix warnings
myfreess Aug 27, 2026
f320759
docs(builtin): expand documentation for Int::clz and sign predicates
0717lee Aug 29, 2026
345b73a
docs(builtin): expand documentation for integer min/max/clamp
0717lee Aug 30, 2026
3d8530d
chore: remove deprecated APIs
Yu-zh Aug 31, 2026
4962142
perf(bytes): skip redundant initialization in concatenation (#4142)
mizchi Aug 31, 2026
8c2976d
refactor(bigint): read each from_octets limb with a u32be pattern (#4…
bobzhang Aug 31, 2026
0566318
feat: improve scalar Arbitrary
CAIMEOX Aug 25, 2026
989ffa8
use integer literal suffix or constructor
CAIMEOX Aug 26, 2026
a27044b
fix: improve test strength
CAIMEOX Aug 26, 2026
0a7a645
refactor: uniform Byte generation
CAIMEOX Aug 26, 2026
81e9d4b
adjust shrinking order of 0
CAIMEOX Aug 26, 2026
ee6421b
perf(bigint): use 64-bit limbs on native and wasm (#4164)
Yu-zh Aug 31, 2026
c103dcf
Handle minimum signed values in QuickCheck shrinking (#4151)
mizchi Aug 31, 2026
63c538b
docs(builtin): correct 7 inaccurate doc comments (#4173)
bobzhang Aug 31, 2026
dcb1a80
docs(numerics): correct 31 inaccurate doc comments (#4174)
bobzhang Aug 31, 2026
9210c61
docs(json, diff & debug docs): correct 10 inaccurate doc comments (#4…
bobzhang Aug 31, 2026
a8db6f2
docs(quickcheck, splitmix & random docs): correct 8 inaccurate doc co…
bobzhang Aug 31, 2026
80ab1a3
docs(tooling & small packages): correct 14 inaccurate doc comments (#…
bobzhang Aug 31, 2026
1425acd
docs(builtin): correct 15 inaccurate doc comments (#4170)
bobzhang Sep 1, 2026
6a6d872
docs(builtin): correct 16 inaccurate doc comments (#4171)
bobzhang Sep 1, 2026
c787739
docs(builtin): correct 18 inaccurate doc comments (#4172)
bobzhang Sep 1, 2026
ae3ea3a
docs(mutable collections): correct 21 inaccurate doc comments (#4175)
bobzhang Sep 1, 2026
780b707
docs(immutable collections): correct 34 inaccurate doc comments (#4176)
bobzhang Sep 1, 2026
49ef195
docs(text & encoding): correct 25 inaccurate doc comments (#4177)
bobzhang Sep 1, 2026
fe89eaa
docs(builtin): expand documentation for UInt64 byte-order conversions
0717lee Aug 31, 2026
3391419
refactor(builtin): add Array::Array constructor, deprecate Array::new
Yu-zh Aug 31, 2026
9127d93
perf(json): cache stringify indentation
mizchi Aug 24, 2026
3e57e09
perf(json): write escaped strings directly
mizchi Aug 24, 2026
2c2286d
perf(json): fill indent cache incrementally, plus oracle test and com…
bobzhang Sep 1, 2026
c5c1bc2
refactor(encoding): use v128 bitstring patterns (#4163)
Yu-zh Sep 1, 2026
220e85f
refactor(encoding/ascii): derive Malformed views from the matched view
bobzhang Sep 1, 2026
d0a9af9
refactor(encoding/utf16): drop the dead leading surrogate checks
bobzhang Sep 1, 2026
d6e2bfa
perf(builtin): format integral doubles without the Ryu search
bobzhang Sep 1, 2026
6647177
perf(builtin): widen the integral fast path to 2^53 with a named bound
bobzhang Sep 1, 2026
4099af7
docs(builtin): correct two stale comments on the integral fast path
bobzhang Sep 1, 2026
4566b75
Revert "refactor(encoding/ascii): derive Malformed views from the mat…
Yu-zh Sep 2, 2026
3082191
perf(bigint): cache decimal division reciprocal (#4188)
Yu-zh Sep 2, 2026
c120939
test: add benchmarks for Array::copy and the to_array paths
Yu-zh Sep 1, 2026
75a339a
refactor(builtin): rename make_uninit to unsafe_make_uninit and expor…
Yu-zh Sep 1, 2026
8075bd2
perf: build Array::copy and the to_array paths without a redundant fill
Yu-zh Sep 1, 2026
b4e2d87
fix(builtin): stop nulling vacated Array slots so views cannot read i…
bobzhang Sep 2, 2026
d9930b6
fix(deque): stop nulling vacated slots so views cannot read invalid m…
bobzhang Sep 2, 2026
2f816fc
fix async lexbuf test, adapt new cancellation semantic
Guest0x0 Sep 3, 2026
03c2e7b
refactor: remove the deprecated strconv compatibility package
bobzhang Sep 3, 2026
bc4bb12
refactor(deque): skip the survivor shift on a tail drain, tighten two…
bobzhang Sep 3, 2026
cb45a68
test(builtin): migrate tuple Show tests to Debug via debug_inspect
bobzhang Sep 3, 2026
ee6fe38
refactor(json): template the ParseError/Json/JsonPath Show impls
bobzhang Sep 3, 2026
5a6dfc3
refactor(builtin): `<+>`-simplify Iter and Map Show and small write s…
bobzhang Sep 3, 2026
27ccb92
refactor(diff, v128): stream Show output through `<+>` and writer hel…
bobzhang Sep 3, 2026
195ab51
refactor(diff): interpolate Range members directly in the template
bobzhang Sep 3, 2026
50531f5
refactor(hashmap, set): remove the deprecated Show impls
bobzhang Sep 3, 2026
3aedb3c
fix async lexbuf test, adapt new cancellation semantic
Guest0x0 Sep 3, 2026
65b074b
fix(builtin): seed hashes from platform entropy
peter-jerry-ye Aug 26, 2026
9d45a74
perf(bigint): batch digits in to_string_radix for non-power-of-two ra…
bobzhang Jul 16, 2026
46a6433
fix(json): reject raw unpaired surrogates in string lexing instead of…
bobzhang Aug 15, 2026
2c7264b
test(json): add adversarial QuickCheck roundtrip properties
bobzhang Aug 14, 2026
ae138a1
test(json): address review — pin depth-1024 parse for both shapes, mu…
bobzhang Aug 15, 2026
ecf2106
test(json): assert clean rejection of lone surrogates per unicode-saf…
bobzhang Aug 15, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion .github/workflows/bleeding-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
version: nightly

- name: run tests
timeout-minutes: 10
timeout-minutes: 20
uses: ./.github/actions/test

- name: Test new allocator
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pre-release-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ jobs:
run: moon check --deny-warn

- name: run tests
timeout-minutes: 10
timeout-minutes: 20
uses: ./.github/actions/test

- name: moon bundle
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/stable-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ jobs:
git diff --exit-code

- name: run tests
timeout-minutes: 10
timeout-minutes: 20
uses: ./.github/actions/test

- name: moon bundle
Expand Down
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,14 @@ changelog should follow [Keep a Changelog](https://keepachangelog.com/en/1.1.0/)
- Core commit: `bd827dc85`
- Added `Debug` trait with `derive(Debug)` support, including `ignore=[..]` configuration for non-debuggable nested types
- Added new `moonbitlang/async` APIs including `@process.spawn`, advisory file locking, `@fs.tmpdir`, `@async.all`, and `@async.any`
- Added `Array::release_unused(placeholder~)`, which overwrites the unused capacity of an array in place with a placeholder, releasing the elements that earlier removals left there
- Added `Deque::release_unused(placeholder~)`, which overwrites the unused capacity of a deque in place with a placeholder, releasing the elements that earlier removals left there

#### Changed

- `Array` shrinking operations no longer null out the slots they vacate, so an `ArrayView` created before the mutation can no longer read uninitialized memory (previously a segfault on native and `null` on wasm-gc; the JavaScript backend is unchanged, and such a view still observes `undefined` past the array's current length there). Mutating an array while a view of it is alive remains a program error, but it now yields unspecified *valid* values rather than undefined behavior. The removed elements stay reachable from the buffer until later pushes reuse those slots, the buffer grows, or the array is dropped -- uniformly, `clear` included, which no longer releases them. `Array::release_unused(placeholder~)` overwrites the unused capacity in place with a placeholder to release them on demand, while `shrink_to_fit`, which already reallocated, lets them go with the old buffer. No existing signature changes
- `Deque` shrinking operations no longer null out the slots they vacate, so an `ArrayView` obtained from `Deque::as_views` before the mutation can no longer read uninitialized memory (previously a segfault on native, `null`/`undefined` elsewhere). Mutating a deque while a view of it is alive remains a program error, but it now yields unspecified *valid* values rather than undefined behavior. The removed elements stay reachable from the buffer until later pushes reuse those slots, the buffer grows, or the deque is dropped -- uniformly, `clear` included, which no longer releases them. `Deque::release_unused(placeholder~)` overwrites the unused capacity in place with a placeholder to release them on demand, while `shrink_to_fit`, which already reallocated, lets them go with the old buffer. No existing signature changes
- **BREAKING**: `@json.parse` now rejects unpaired `\uXXXX` surrogate escapes in strings, raising `ParseError::InvalidChar` at the backslash that opens the offending escape; an escaped leading surrogate must be followed immediately by an escaped trailing surrogate, and the pair decodes to the character it denotes. Previously such escapes were decoded unchecked and produced a `String` that was not well-formed Unicode. `@json.valid` reports the same documents as invalid. JSON emitted by `JSON.stringify` in JavaScript can contain these escapes, so input that JavaScript and Python accept may now be rejected — as it is by Rust's serde_json
- `@json.inspect` has been migrated to `json_inspect`
- `String::sub` and `StringView::sub` now panic on invalid indices instead of raising `CreatingViewError`. The `CreatingViewError` type has been removed.

Expand Down
9 changes: 9 additions & 0 deletions NOTICE
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,15 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

File random/random.mbt is adapted from Golang's [`math/rand/v2`](https://pkg.go.dev/math/rand/v2) package.

Files `internal/strconv/strconv_eisel_lemire.mbt` and
`internal/strconv/strconv_eisel_lemire_table.mbt` are adapted from Go 1.26.2's
`internal/strconv/atofeisel.go` and generated `internal/strconv/pow10tab.go`.

Files `bigint/arith_wide.mbt` and `bigint/bigint_wide.mbt` are adapted from
Go's `math/big` package, specifically `src/math/big/arith.go`,
`src/math/big/nat.go`, `src/math/big/natmul.go`, and
`src/math/big/natdiv.go`.

License from Golang:
Copyright 2009 The Go Authors.

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ graph BT
prelude["<b>prelude</b> — auto-opened re-exports<br/>from builtin, debug, test, bigint, …"] --> builtin
values["<b>value types</b><br/>bool · byte · char · unit · option · result<br/>error · ref · tuple · cmp · range · lazy"] --> builtin
numbers["<b>numerics</b><br/>int · uint · int16 · uint16 · int64 · uint64<br/>double · float · bigint · v128 · math"] --> builtin
text["<b>text & binary</b><br/>string · bytes · buffer · encoding/*<br/>strconv · lexbuf"] --> builtin
text["<b>text & binary</b><br/>string · bytes · buffer · encoding/*<br/>lexbuf"] --> builtin
mut["<b>mutable collections</b><br/>array · hashmap · hashset · deque · queue<br/>priority_queue · set · sorted_map · sorted_set"] --> builtin
imm["<b>immutable collections</b><br/>list · lazy_list · immut/vector<br/>immut/hashmap · immut/sorted_map · …"] --> builtin
tools["<b>algorithms & tooling</b><br/>json · diff · random · quickcheck · argparse<br/>bench · test · debug · env"] --> builtin
Expand Down
13 changes: 5 additions & 8 deletions argparse/arg_spec.mbt
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ pub(all) enum FlagAction {
///|
/// Behavior for option args.
///
/// - `Set` keeps the last provided value.
/// - `Set` accepts the value once; a repeated occurrence is an error.
/// - `Append` keeps all provided values in order.
pub(all) enum OptionAction {
Set
Expand Down Expand Up @@ -89,8 +89,10 @@ pub struct FlagArg {
/// - At least one of `short`, `long`, or `env` must be available.
/// - `global=true` makes the flag available in subcommands.
/// - `negatable=true` accepts `--no-<long>` for long flags.
/// - If `env` is set, accepted boolean values are:
/// `1`, `0`, `true`, `false`, `yes`, `no`, `on`, `off`.
/// - If `env` is set on a `SetTrue` / `SetFalse` flag, accepted boolean
/// values are: `1`, `0`, `true`, `false`, `yes`, `no`, `on`, `off`.
/// - If `env` is set on a `Count` flag, the value must be a non-negative
/// integer.
#alias(new, deprecated="Use `FlagArg()` instead")
pub fn FlagArg::FlagArg(
name : StringView,
Expand Down Expand Up @@ -240,11 +242,6 @@ pub fn PositionArg::PositionArg(
}
}

///|
fn arg_name(arg : Arg) -> String {
arg.name
}

///|
fn range_allows_multiple(range : ValueRange?) -> Bool {
range is Some(r) &&
Expand Down
Loading