Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Publish as AOS module and allow for self ownership and a predefined controllers list on boot #22

Merged
merged 6 commits into from
Feb 25, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 12 additions & 2 deletions .github/workflows/lua.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,17 @@ jobs:
cache: 'yarn'

- run: yarn --frozen-lockfile
- run: yarn build
- name: Install AO Tool
run: |
curl -L https://install_ao.g8way.io | sh
export AO_INSTALL=/home/runner/.ao
export PATH="$AO_INSTALL/bin:$PATH"
echo "AO_INSTALL=$AO_INSTALL" >> $GITHUB_ENV
echo "PATH=$PATH" >> $GITHUB_ENV
- name: Verify AO Installation
run: ao -V
- run: yarn copy-aos-process
- run: yarn build && yarn module:build
- run: yarn test:integration

unit:
Expand All @@ -68,7 +78,7 @@ jobs:
evolve:
runs-on: ubuntu-latest
needs: [integration, unit, lint]
if: github.ref == 'refs/heads/develop' || github.ref == 'refs/heads/main'
if: github.ref == 'refs/heads/main'
environment: ${{ github.ref_name }}
steps:
- uses: actions/checkout@v4
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,5 @@ luacov-html
dist
luacov.stats.out
coverage
aos-process
build
9 changes: 9 additions & 0 deletions process/ao-build-config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# ao-dev-cli options
stack_size: 3145728 # 3MiB
initial_memory: 4194304 # 4MiB stack size is included in initial memory, along with heap
maximum_memory: 1073741824 # 1GiB
target: 32 # wasm32 or wasm 64
# extra info
aos_git_hash: 'e9fc10c54b4f21302ee8d084d31f3383b46857b2' # used to pull in the 'process' folder at a specific git hash
compute_limit: '9000000000000' # used in publishing
module_format: 'wasm32-unknown-emscripten-metering'
12 changes: 9 additions & 3 deletions process/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,20 @@
"scripts": {
"build": "node tools/bundle-aos.mjs",
"lint": "luacheck .",
"test:integration": "yarn build && node --test --test-concurrency 1 --experimental-wasm-memory64 **/*.test.mjs",
"test:integration": "node --test --test-concurrency 1 --experimental-wasm-memory64 **/*.test.mjs",
"test:unit": "busted .",
"evolve": "yarn build && node tools/evolve.mjs"
"evolve": "yarn build && node tools/evolve.mjs",
"copy-aos-process": "node tools/copy-aos-process.mjs",
"module:build": "rm -rf dist && yarn build && rm -rf build && cp -r tools/fixtures/aos-process build && cp dist/process.lua build/vaot.lua && yarn node tools/inject-vaot-code.mjs && cd build && ao build && mv process.wasm ../dist/aos-vaot.wasm && cd .. && yarn module:load",
"module:publish": "node tools/publish-module.mjs",
"module:load": "node tools/load-module.mjs"
},
"devDependencies": {
"@ar.io/sdk": "^3.2.0",
"@ardrive/turbo-sdk": "^1.19.0",
"@permaweb/ao-loader": "^0.0.44",
"@permaweb/aoconnect": "^0.0.63"
"@permaweb/aoconnect": "^0.0.63",
"js-yaml": "^4.1.0"
},
"lint-staged": {
"*.lua": [
Expand Down
3 changes: 3 additions & 0 deletions process/src/aos.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
local vaot = require(".main")

vaot.init()
Loading
Loading