4 Star 0 Fork 2

Gitee 极速下载 / rsqlite3

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
此仓库是为了提升国内下载速度的镜像仓库,每日同步一次。 原始仓库: https://github.com/epilys/rsqlite3
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README

sqlite3 Rewritten in RiiR Rust 🦀🦀🦀

Finally, one of the best written software paired with one of the best writable programming language‽ Fearless and memory safe, since the uncountable amount of unsafe {} blocks makes you not care anymore.

Build and run

$ cargo +nightly build --release
# ... bunch of stuff I choose not to understand/read
warning: `rsqlite3` (bin "rsqlite3") generated 37 warnings (24 duplicates)
    Finished release [optimized] target(s) in 39.84s
$ ./target/release/rsqlite3
-- Loading resources from /home/epilys/.sqliterc
SQLite version 3.37.0 2021-10-17 10:31:09
Enter ".help" for usage hints.
Connected to a transient in-memory database.
Use ".open FILENAME" to reopen on a persistent database.
sqlite> .open rrrrrruuuuuust.db
sqlite> CREATE TABLE opinions(x);
sqlite> insert into opinions(x) values (hex(randomblob(16)));
sqlite> insert into opinions(x) values (hex(randomblob(16)));
sqlite> insert into opinions(x) values (hex(randomblob(16)));
sqlite> insert into opinions(x) values (hex(randomblob(16)));
sqlite> select * from opinions;
x
--------------------------------
343D4BE24D07A96F8550B0942F664A6C
D6289536E4A8057EB44754358EACD31A
B4CA8E714CB57B11E7336263D214F30F
A6491CA289ABF90EB2D76F5E1F919272
sqlite> PRAGMA journal_mode = wal;
journal_mode
------------
wal
sqlite> PRAGMA integrity_check;
integrity_check
---------------
ok
sqlite> VACUUM;
sqlite> ^D

Wait, what?

This is just the sqlite3 code passed throught the c2rust transpiler, along with some cleanup from me. I've found no way to hook it to sqlite3's testing harnesses yet so I doubt it's completely functional; but opening the shell seems to work.

I am suspicious that a lot of code under ifdefs or not is lost through the transpilation, because the binary size difference is substantial:

$ du -sh $(which sqlite3)
9.5M    /home/epilys/.local/bin/sqlite3
$ du -sh target/release/rsqlite3
5.1M    target/release/rsqlite3

空文件

简介

rsqlite3 是使用 Rust 重写的 sqlite3 数据库 展开 收起
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
Rust
1
https://gitee.com/mirrors/rsqlite3.git
git@gitee.com:mirrors/rsqlite3.git
mirrors
rsqlite3
rsqlite3
main

搜索帮助