GithubHelp home page GithubHelp logo

permaweb / aos-sqlite Goto Github PK

View Code? Open in Web Editor NEW
28.0 3.0 5.0 9.85 MB

AOS Module built with LUA and SQLite

Dockerfile 0.04% Shell 0.01% Lua 0.23% Python 0.15% C 99.55% JavaScript 0.02% Makefile 0.01%

aos-sqlite's Introduction

AOS-SQLite

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 - ghSkge2sIUD_F00ym5sEimC63BDBuBrq4b5OcwxOjiw

Run a SQLite Database with AOS(WASM64)

aos my-sqlite --module=ghSkge2sIUD_F00ym5sEimC63BDBuBrq4b5OcwxOjiw

Run a SQLite Database with AOS(WASM32)

aos my-sqlite --module=GYrbbe0VbHim_7Hi6zrOpHQXrSQz07XNtwCnfbFo2I0

Spawn via a process

Spawn('ghSkge2sIUD_F00ym5sEimC63BDBuBrq4b5OcwxOjiw', { Data = "Hello SQLite Wasm64" })

Examples

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

AO Resources


This project builds the AOS-SQLITE WASM Binary and Publishes it to Arweave.

Build Process

  1. Build docker image
cd container
./build.sh
  1. Get Latest aos module
git submodule init
git submodule update --remote
  1. Use docker image to compile process.wasm
cd aos/process
docker run -v .:/src p3rmaw3b/ao emcc-lua
  1. Publish Module with tags via arkb

You will need a funded wallet for this step

export WALLET=~/.wallet.json
npm run deploy

aos-sqlite's People

Contributors

twilson63 avatar smowden avatar

Stargazers

 avatar Potter avatar antain avatar FUDBear avatar bigbigworld avatar Shuaib Yunus avatar  avatar Siddharth Manjul avatar Eureka Chen avatar Ankush Singh avatar Tomoya Nagasawa avatar  avatar k1ic avatar tarumi avatar Gordon avatar CryptoJedi avatar yeshua avatar Dylan Fiedler avatar Jharmony avatar AdamLee avatar chenke avatar Erhan avatar Marton Lederer avatar  avatar codingsh avatar  avatar  avatar Pawan Paudel avatar

Watchers

 avatar  avatar Jareer avatar

aos-sqlite's Issues

feat: assignment support

Background

AOS-SQLite implements Sqlite in the AOS Lua Web Assembly Module, this means that the SQLite module supports all of the AOS Features, but includes SQLite3.

Problem

AOS recently added the support for Assignments this AO feature allows users to send existing TX's to processes without having to create a duplicate message. Since Arweave Data is permanent then send an existing message to a process should not require creating another data-item.

This issue is a feature request to rebuild the SQLite module with Assignment Support.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.