-
Notifications
You must be signed in to change notification settings - Fork 388
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
[META] Standard Library wishlist #1267
Milestone
Comments
Closed
This was referenced Oct 21, 2023
Merged
18 tasks
moul
pushed a commit
that referenced
this issue
Oct 25, 2023
<!-- please provide a detailed description of the changes made in this pull request. --> Add hash stdlib (especially adler32) and add encoding for dependency ## relate issue #1267
gfanton
pushed a commit
to gfanton/gno
that referenced
this issue
Nov 9, 2023
<!-- please provide a detailed description of the changes made in this pull request. --> Add hash stdlib (especially adler32) and add encoding for dependency ## relate issue gnolang#1267
moul
pushed a commit
to moul/gno
that referenced
this issue
Nov 14, 2023
<!-- please provide a detailed description of the changes made in this pull request. --> Add hash stdlib (especially adler32) and add encoding for dependency ## relate issue gnolang#1267
thehowl
added a commit
that referenced
this issue
Jun 28, 2024
This PR ports over to Gno the [math/rand/v2](https://pkg.go.dev/math/rand/v2) Go package. It provides pseudo-random number generation. Notable omissions: - the [`N` generic function](https://pkg.go.dev/math/rand/[email protected]#N) - The [chacha8 random source](https://pkg.go.dev/math/rand/[email protected]#ChaCha8) (we can use PCG instead; and chacha8 can be implemented later) This PR requires a version bump to go 1.22 to have math/rand/v2 in the standard libraries; otherwise the Native tests won't work. We can rollback the changes to move it to 1.22 by removing the native math/rand implementation, and only using the stdlibs. BREAKING CHANGE: existing usages of math/rand used Go's math/rand; however, in this new standard library we use its v2, so results will be different. Closes #1272; See-also #1267 <details><summary>Contributors' checklist...</summary> - [x] Added new tests, or not needed, or not feasible - [x] Provided an example (e.g. screenshot) to aid review or the PR is self-explanatory - [x] Updated the official documentation or not needed - [x] No breaking changes were made, or a `BREAKING CHANGE: xxx` message was included in the description - [x] Added references to related issues and PRs - [x] Provided any useful hints for running manual tests - [ ] Added new benchmarks to [generated graphs](https://gnoland.github.io/benchmarks), if any. More info [here](https://github.com/gnolang/gno/blob/master/.benchmarks/README.md). </details>
gfanton
pushed a commit
to gfanton/gno
that referenced
this issue
Jul 23, 2024
This PR ports over to Gno the [math/rand/v2](https://pkg.go.dev/math/rand/v2) Go package. It provides pseudo-random number generation. Notable omissions: - the [`N` generic function](https://pkg.go.dev/math/rand/[email protected]#N) - The [chacha8 random source](https://pkg.go.dev/math/rand/[email protected]#ChaCha8) (we can use PCG instead; and chacha8 can be implemented later) This PR requires a version bump to go 1.22 to have math/rand/v2 in the standard libraries; otherwise the Native tests won't work. We can rollback the changes to move it to 1.22 by removing the native math/rand implementation, and only using the stdlibs. BREAKING CHANGE: existing usages of math/rand used Go's math/rand; however, in this new standard library we use its v2, so results will be different. Closes gnolang#1272; See-also gnolang#1267 <details><summary>Contributors' checklist...</summary> - [x] Added new tests, or not needed, or not feasible - [x] Provided an example (e.g. screenshot) to aid review or the PR is self-explanatory - [x] Updated the official documentation or not needed - [x] No breaking changes were made, or a `BREAKING CHANGE: xxx` message was included in the description - [x] Added references to related issues and PRs - [x] Provided any useful hints for running manual tests - [ ] Added new benchmarks to [generated graphs](https://gnoland.github.io/benchmarks), if any. More info [here](https://github.com/gnolang/gno/blob/master/.benchmarks/README.md). </details>
thehowl
pushed a commit
that referenced
this issue
Oct 3, 2024
<!-- please provide a detailed description of the changes made in this pull request. --> related to #1267 - Implement html golang package. - Added a silly implementation of strings.Replacer: Maybe we should optimize it ? I did not wanted to do something complex as this is not the main point of this pull request <details><summary>Contributors' checklist...</summary> - [ ] Added new tests, or not needed, or not feasible - [ ] Provided an example (e.g. screenshot) to aid review or the PR is self-explanatory - [ ] Updated the official documentation or not needed - [ ] No breaking changes were made, or a `BREAKING CHANGE: xxx` message was included in the description - [ ] Added references to related issues and PRs - [ ] Provided any useful hints for running manual tests - [ ] Added new benchmarks to [generated graphs](https://gnoland.github.io/benchmarks), if any. More info [here](https://github.com/gnolang/gno/blob/master/.benchmarks/README.md). </details>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
See Go<>Gno compatibility for a current state.
This issue is intended as a starting place for anyone who wants to work on adding new standard libraries to Gno. It's an opinionated collection of libraries which I think should be added to the Gno standard libraries.
General workflow for adding stdlibs:
/usr/lib/go/src/$path
directoryfor i in *.go; do g="$(echo $i | sed 's/.go$/.gno/')"; mv $i $g; done
go test tests/*.go -run "TestPackages/your/package/path"
, fix, repeat until it works! (run fromgnovm
directory)Consider, of course, adding new tests where appropriate, and disabling features when we don't support them (like reflect for now).
Up for grabs
context
encoding
feat(stdlibs): addencoding
,encoding/{base32,binary,csv}
#1290encoding/base32
feat(stdlibs): addencoding
,encoding/{base32,binary,csv}
#1290encoding/binary
feat(stdlibs): addencoding
,encoding/{base32,binary,csv}
#1290encoding/csv
feat(stdlibs): addencoding
,encoding/{base32,binary,csv}
#1290encoding/pem
expvar
-- maybe, discussion Add "debug" stdlib #1266feat: add hash #1273hash
hash/crc32
html
io/fs
feat: Porting io/fs package #1323math
-- feat(stdlibs): add math and math/bits #1153math/bits
-- feat(stdlibs): add math and math/bits #1153math/rand
Port math/rand to gno #1272Better after native bindings #859
Crypto libraries are generally better after native bindings as they greatly benefit from native performance.
crypto/aes
crypto/des
crypto/dsa
crypto/ecdh
crypto/ecdsa
crypto/ed25519
crypto/hmac
crypto/elliptic
crypto/md5
crypto/rsa
crypto/sha1
reflect
strconv
text/scanner
text/tabwriter
Better after reflection
encoding/asn1
encoding/json
encoding/gob
(not sure about this, but it could be fun!)encoding/xml
encoding/binary
(full)fmt
html/template
text/template
text/template/parse
sort
errors
update (Is, As, Unwrap...)Possibly, but need discussion
math/big
tags: stdlibs stdlib encoding/json reflect
The text was updated successfully, but these errors were encountered: