WIP rebuild of the AOS-Sqlite code to run llama2.c.
AOS-SQLite combines the ao operating system module and sqlite to create an ao custom module to add a lightweight but powerful indexer to your aos experience.
The bulk of this effort was done by @elliotsayes during the Hack the Weave competition, Elliot was able to create this WASM Binary that includes both SQLite, LUA, and aos, as an
ao
Module.
AOS-SQLite Module - GYrbbe0VbHim_7Hi6zrOpHQXrSQz07XNtwCnfbFo2I0
Run a SQLite Database with AOS
AOS_MODULE=GYrbbe0VbHim_7Hi6zrOpHQXrSQz07XNtwCnfbFo2I0 aos my-sqlite
Spawn('GYrbbe0VbHim_7Hi6zrOpHQXrSQz07XNtwCnfbFo2I0', {})
local sqlite3 = require("lsqlite3")
db = sqlite3.open_memory()
db:exec[[
CREATE TABLE test (id INTEGER PRIMARY KEY, content);
INSERT INTO test VALUES (NULL, 'Hello Lua');
INSERT INTO test VALUES (NULL, 'Hello Sqlite3');
INSERT INTO test VALUES (NULL, 'Hello ao!!!');
]]
return "ok"
local s = ""
for row in db:nrows("SELECT * FROM test") do
s = s .. row.id .. ": " .. row.content .. "\\n"
end
return s
This project builds the AOS-SQLITE WASM Binary and Publishes it to Arweave.
- Build docker image
cd container
./build.sh
- Get Latest aos module
git submodule init
git submodule update --remote
- Use docker image to compile process.wasm
cd aos/process
docker run -v .:/src p3rmaw3b/ao emcc-lua
- Publish Module with tags via arkb
You will need a funded wallet for this step
export WALLET=~/.wallet.json
npm run deploy