Gostd

crates.io Released API docs GPL3 licensed Downloads of Crates.io Lines of code Build Languages

Gostd is the golang standard library implementation in rust-lang.

Gostd是rust-lang中的golang标准库实现。

rust 语法比go复杂,但是go代码简单好理解,想通过这个项目把go的标准库通过rust实现。以后有什么go的项目可以通过它方便翻译代码到rust,比如把 import "bytes" 改成 use gostd::bytes 就可以实现转换。

本项目纯粹个人兴趣,大概率会失败,但是梦想还是要有的万一它实现了。

go to rust,to be rust or to be failed.

已知难点

需要用rust实现的go标准库列表,go.1.17.1代码做参考。

go 这个包不会实现,因为我们转换成rust基本用不上这个包。 ├── archive ├── bufio ├── builtin ├── bytes ├── cmd ├── compress ├── container ├── context ├── crypto ├── database ├── debug ├── embed ├── encoding ├── errors ├── expvar ├── flag ├── fmt ├── go ├── hash ├── html ├── image ├── index ├── internal ├── io ├── log ├── math ├── mime ├── net ├── os ├── path ├── plugin ├── reflect ├── regexp ├── runtime ├── sort ├── strconv ├── strings ├── sync ├── syscall ├── testdata ├── testing ├── text ├── time ├── unicode ├── unsafe └── vendor

对应预期实现后的gostd的Model列表

use gostd::archive use gostd::bufio use gostd::builtin use gostd::bytes use gostd::cmd use gostd::compress use gostd::container use gostd::context use gostd::crypto use gostd::database use gostd::debug use gostd::embed use gostd::encoding use gostd::errors use gostd::expvar use gostd::flag use gostd::fmt use gostd::go use gostd::hash use gostd::html use gostd::image use gostd::index use gostd::internal use gostd::io use gostd::log use gostd::math use gostd::mime use gostd::net use gostd::os use gostd::path use gostd::plugin use gostd::reflect use gostd::regexp use gostd::runtime use gostd::sort use gostd::strconv use gostd::strings use gostd::sync use gostd::syscall use gostd::testdata use gostd::testing use gostd::text use gostd::time use gostd::unicode use gostd::unsafe use gostd::vendor

大致方向

todo