Skip to content
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

Instructions on how to build sqlite3.exe for windows #90

Closed
fire opened this issue Oct 19, 2022 · 2 comments
Closed

Instructions on how to build sqlite3.exe for windows #90

fire opened this issue Oct 19, 2022 · 2 comments

Comments

@fire
Copy link

fire commented Oct 19, 2022

Windows support with sqlite3.exe

cmd
scoop install llvm openssl-mingw llvm-mingw
cargo build --release -p mvsqlite` Works on Windows 11.
cd mvsqlite/mvsqlite
# Tinkering with shims see zip.
gcc -O2 -o sqlite3 sqlite3.c shell.c shim.c preload.c -L../target/release -LC:/Users/elee/scoop/apps/openssl-mingw/current/lib64 -lmvsqlite -lssl -lcrypto -lWs2_32 -lbcrypt -lUserenv -lntdll
set RUST_LOG=info
set MVSQLITE_DATA_PLANE=http://localhost:7000
sqlite3.exe test
.vfslist
  2022-10-19T05:05:35.621924Z  INFO mvsqlite: mvsqlite initialized, default_sector_size: 8192
    at mvsqlite\src\lib.rs:174

SQLite version 3.39.3 2022-09-05 11:02:23
Enter ".help" for usage hints.
sqlite> .vfslist
vfs.zName      = "mvsqlite"  <--- CURRENT
[...]

mvsqlite.zip

We are assuming that the fdb and mvstore is in an ubuntu os. That they've been started and the admin interface has been used to create a test database.

Other notes

The dependencies openssl-devel are required for ssl and crypto. Might be able to use mbedtls.

@fire fire changed the title How to statically link? How to statically link sqlite? Oct 19, 2022
@fire fire changed the title How to statically link sqlite? Instructions on how to build sqlite3.exe Oct 19, 2022
@fire
Copy link
Author

fire commented Oct 19, 2022

I made a partial godot engine sqlite module. It's partial because it doesn't store the rust code. It fetches the static library from the Windows 11 filesystem.

https://github.com/V-Sekai/godot-sqlite/tree/mvsqlite

image

I told godot to do a listing of the database tables.

@fire fire changed the title Instructions on how to build sqlite3.exe Instructions on how to build sqlite3.exe for windows Oct 21, 2022
@fire
Copy link
Author

fire commented Dec 12, 2022

Closing because I am using this and it appears to work for me.

@fire fire closed this as completed Dec 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant