Skip to content

Commit

Permalink
chore(aos): use wasm64 version of the module
Browse files Browse the repository at this point in the history
  • Loading branch information
Atticus committed Jun 24, 2024
1 parent 71e2aca commit b7812d3
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"aos:publish": "node tools/bundle-aos.js && node tools/publish-aos.js",
"aos:load": "node tools/bundle-aos.js && node tools/load-aos.js",
"aos:spawn": "node tools/spawn-aos.js",
"test": "node --test --test-concurrency 1 **/*.test.js"
"test": "node --test --test-concurrency 1 --experimental-wasm-memory64 **/*.test.js"
},
"devDependencies": {
"prettier": "^3.3.2",
Expand Down
2 changes: 1 addition & 1 deletion src/common/main.lua
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,7 @@ function ant.init()
local recordsNotice = {
Target = msg.From,
Action = "Records-Notice",
Data = json.encode(records),
Data = records,
}

-- Add forwarded tags to the records notice messages
Expand Down
2 changes: 2 additions & 0 deletions test/records.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,8 @@ describe('aos Records', async () => {
setRecordResult.Memory,
);

console.log(recordsResult.Messages[0].Data);

const record = JSON.parse(recordsResult.Messages[0].Data)['@'];
assert(record.transactionId === ''.padEnd(43, '3'));
assert(record.ttlSeconds === 3600);
Expand Down
4 changes: 2 additions & 2 deletions tools/constants.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ const AO_LOADER_HANDLER_ENV = {
};

const AO_LOADER_OPTIONS = {
format: 'wasm32-unknown-emscripten',
format: 'wasm64-unknown-emscripten-draft_2024_02_15',
inputEncoding: 'JSON-1',
outputEncoding: 'JSON-1',
memoryLimit: '524288000', // in bytes
Expand All @@ -26,7 +26,7 @@ const AO_LOADER_OPTIONS = {
const AOS_WASM = fs.readFileSync(
path.join(
__dirname,
'fixtures/aos-9afQ1PLf2mrshqCTZEzzJTR2gWaC9zNPnYgYEqg1Pt4.wasm',
'fixtures/aos-cbn0KKrBZH7hdNkNokuXLtGryrWM--PjSTBqIzw9Kkk.wasm',
),
);

Expand Down
Binary file not shown.
Binary file not shown.

0 comments on commit b7812d3

Please sign in to comment.