| Crates.io | ggstd |
| lib.rs | ggstd |
| version | 0.1.0 |
| created_at | 2023-07-12 05:41:11.746321+00 |
| updated_at | 2023-11-11 06:07:04.648229+00 |
| description | Partial implementation of Go standard library |
| homepage | |
| repository | https://github.com/gtrafimenkov/rust-ggstd |
| max_upload_size | |
| id | 914283 |
| size | 5,254,461 |
This is a humble attempt to port some of the Go standard library to Rust.
Why:
If you are considering using this library, take following into account:
You can run these using following commands:
cargo run --example flate
go run goexamples/flate/main.go
cargo run --example user
go run goexamples/user/main.go
See all Rust examples in examples folder and corresponding Go examples in goexamples folder.
1.70.0
When a piece of functionality is needed, appropriate Go source code is copied from go1.20.11 and translated to Rust.
std::io::Read and
std::io::Write. That makes the code more idiomatic and more compatible with
the rest of Rust ecosystemNewObject() is changed to Rust Object::new()Go: 1 << 1 + 1 == 3
Rust: 1 << 1 + 1 == 4
cargo doc, cargo clippy, cargo clippy --testsMost of the code is under the same license as used by Go project (BSD 3-Clause): see LICENSE.
There are small pieces under MIT license:
src/winapi_.rs, src/libc_.rs.
When a new file contains anything copied from the Go codebase, add this at the top of the file:
// Copyright 2023 The rust-ggstd authors.
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
When nothing is copied from the Go codebase and the file is an example in examples or goexamples,
add this:
// Copyright 2023 The rust-ggstd authors.
// SPDX-License-Identifier: 0BSD
When nothing is copied from the Go codebase and the file is not an example:
// Copyright 2023 The rust-ggstd authors.
// SPDX-License-Identifier: BSD-3-Clause