Bountiesterminal terminal prompt Hand it to a coding agent layers-place.wit layers-place.cases.json
layers / layers-placeBuilt by daveRuns on Liberas
Place
Copies the input onto a transparent (0, 0, 0, 0) canvas of width × height with the input's top-left corner at (x, y); x and y may be negative, and whatever falls outside the canvas is dropped. Width and height must be at least 1 and within 16,777,216 pixels. An input whose pixels are not width × height × 4 bytes is an error.
From your terminal
npm i -g https://liberas.dev/cli/liberas.tgzexport LIBERAS_URL=https://liberas.devliberas init layers-place --lang rustcd layers-place && liberas build && liberas submit
Save a token once with liberas login (make it on your page, /me, after signing in). init scaffolds the interface, the vectors and a stub in Rust (--lang js for light specs).
claude mcp add liberas -- npx -y https://liberas.dev/cli/liberas.tgz mcp
Take the Liberas bounty layers-place: read the spec with liberas_spec, scaffold it in Rust with liberas_init, implement it exactly, then liberas_build and liberas_submit until it passes.
Interface (WIT)30 lines›
package root:component;
world root {
import liberas:image/types@0.1.0;
import liberas:layers/types@0.1.0;
export liberas:layers/place@0.1.0;
}
package liberas:image@0.1.0 {
interface types {
record image {
width: u32,
height: u32,
pixels: list<u8>,
}
}
}
package liberas:layers@0.1.0 {
interface types {
use liberas:image/types@0.1.0.{image};
}
interface place {
use types.{image};
apply: func(input: image, x: s32, y: s32, width: u32, height: u32) -> result<image, string>;
}
}
Test vectors12›
[
{
"args": {
"x": 0,
"y": 0,
"input": {
"width": 4,
"height": 4,
"pixels": "LycDA1QuBP95NQf/njwM/zpcBv9fYwf/hGoK/6lxD/9FkQn/apgK/4+fDf+0phJaUMYM/3XNDf+a1BA9v9sV/w=="
},
"width": 4,
"height": 4
}
},
{
"args": {
"x": 2,
"y": 1,
"input": {
"width": 4,
"height": 4,
"pixels": "LycDA1QuBP95NQf/njwM/zpcBv9fYwf/hGoK/6lxD/9FkQn/apgK/4+fDf+0phJaUMYM/3XNDf+a1BA9v9sV/w=="
},
"width": 8,
"height": 6
}
},
{
"args": {
"x": -2,
"y": -3,
"input": {
"width": 4,
"height": 4,
"pixels": "LycDA1QuBP95NQf/njwM/zpcBv9fYwf/hGoK/6lxD/9FkQn/apgK/4+fDf+0phJaUMYM/3XNDf+a1BA9v9sV/w=="
},
"width": 4,
"height": 4
}
},
{
"args": {
"x": 5,
"y": 3,
"input": {
"width": 7,
"height": 5,
"pixels": "lDQEBLk7Bf/eQgj/A0kN/yhQFP9NVx2Vcl4o/59pB//EcAj/6XcL/w5+EP8zhRd4WIwg/32TK/+qngr/z6UL//SsDv8ZsxNbProa/2PBI/+IyC7/tdMN/9raDv//4RE+JOgW/0nvHf9u9ib/k/0x/8AIEP/lDxEhChYU/y8dGf9UJCD/eSsp/54yNLI="
},
"width": 6,
"height": 4
}
},
{
"args": {
"x": -8,
"y": 8,
"input": {
"width": 16,
"height": 16,
"pixels": "+UEFBR5IBv9DTwn/aFYO/41dFf+yZB6W12sp//xyNv8heUX/RoBW/2uHaSeQjn7/tZWV/9qcrv//o8n/JKrmuAR2CP8pfQn/ToQM/3OLEf+Ykhh5vZkh/+KgLP8Hpzn/LK5I/1G1WQp2vGz/m8OB/8DKmP/l0bH/CtjMmy/f6f8Pqwv/NLIM/1m5D/9+wBRco8cb/8jOJP/t1S//Etw8/zfjS+1c6lz/gfFv/6b4hP/L/5v/8Aa0fhUNz/86FOz/GuAO/z/nD/9k7hI/ifUX/678Hv/TAyf/+Aoy/x0RP9BCGE7/Zx9f/4wmcv+xLYf/1jSeYfs7t/8gQtL/RUnv/yUVEf9KHBIibyMV/5QqGv+5MSH/3jgq/wM/NbMoRkL/TU1R/3JUYv+XW3X/vGKKROFpof8GcLr/K3fV/1B+8v8wShQFVVEV/3pYGP+fXx3/xGYk/+ltLZYOdDj/M3tF/1iCVP99iWX/opB4J8eXjf/snqT/EaW9/zas2P9bs/W4O38X/2CGGP+FjRv/qpQg/8+bJ3n0ojD/Gak7/z6wSP9jt1f/iL5oCq3Fe//SzJD/99On/xzawP9B4dubZuj4/0a0Gv9ruxv/kMIe/7XJI1za0Cr//9cz/yTePv9J5Uv/buxa7ZPza/+4+n7/3QGT/wIIqv8nD8N+TBbe/3Ed+/9R6R3/dvAe/5v3IT/A/ib/5QUt/woMNv8vE0H/VBpO0HkhXf+eKG7/wy+B/+g2lv8NPa1hMkTG/1dL4f98Uv7/XB4g/4ElISKmLCT/yzMp//A6MP8VQTn/OkhEs19PUf+EVmD/qV1x/85khP/za5lEGHKw/z15yf9igOT/h4cB/2dTIwWMWiT/sWEn/9ZoLP/7bzP/IHY8lkV9R/9qhFT/j4tj/7SSdP/ZmYcn/qCc/yOns/9Irsz/bbXn/5K8BLhyiCb/l48n/7yWKv/hnS//BqQ2eSurP/9Qskr/dblX/5rAZv+/x3cK5M6K/wnVn/8u3Lb/U+PP/3jq6pud8Qf/fb0p/6LEKv/Hyy3/7NIyXBHZOf824EL/W+dN/4DuWv+l9Wntyvx6/+8Djf8UCqL/ORG5/14Y0n6DH+3/qCYK/4jyLP+t+S3/0gAwP/cHNf8cDjz/QRVF/2YcUP+LI13QsCps/9Uxff/6OJD/Hz+l/0RGvGFpTdX/jlTw/7NbDf+TJy//uC4wIt01M/8CPDj/J0M//0xKSP9xUVOzllhg/7tfb//gZoD/BW2T/yp0qERPe7//dILY/5mJ8/++kBD/nlwyBcNjM//oajb/DXE7/zJ4Qv9Xf0uWfIZW/6GNY//GlHL/65uD/xCilic1qav/WrDC/3+32/+kvvb/ycUTuA=="
},
"width": 16,
"height": 16
}
},
{
"args": {
"x": 3,
"y": 3,
"input": {
"width": 1,
"height": 1,
"pixels": "ZQ0BAQ=="
},
"width": 5,
"height": 5
}
},
{
"args": {
"x": 100,
"y": 0,
"input": {
"width": 9,
"height": 7,
"pixels": "Xk4GBoNVB/+oXAr/zWMP//JqFv8XcR+XPHgq/2F/N/+Ghkb/aYMJ/46KCv+zkQ3/2JgS//2fGXoipiL/R60t/2y0Ov+Ru0n/dLgM/5m/Df++xhD/480VXQjUHP8t2yX/UuIw/3fpPf+c8Ezuf+0P/6T0EP/J+xNA7gIY/xMJH/84ECj/XRcz/4IeQNGnJU//iiIS/68pEyPUMBb/+Tcb/x4+Iv9DRSv/aEw2tI1TQ/+yWlL/lVcVBrpeFv/fZRn/BGwe/ylzJf9Oei6Xc4E5/5iIRv+9j1X/oIwY/8WTGf/qmhz/D6Eh/zSoKHpZrzH/frY8/6O9Sf/IxFj/"
},
"width": 9,
"height": 7
}
},
{
"args": {
"x": 1,
"y": -1,
"input": {
"width": 5,
"height": 8,
"pixels": "KGgICE1vCf9ydgz/l30R/7yEGP8znQv/WKQM/32rD/+ishT/x7kbfD7SDv9j2Q//iOAS/63nF1/S7h7/SQcR/24OEv+TFRVCuBwa/90jIf9UPBT/eUMVJZ5KGP/DUR3/6Fgk/19xFwiEeBj/qX8b/86GIP/zjSf/aqYa/4+tG/+0tB7/2bsj//7CKnx12x3/muIe/7/pIf/k8CZfCfct/w=="
},
"width": 2,
"height": 2
}
},
{
"args": {
"x": 0,
"y": 0,
"input": {
"width": 12,
"height": 10,
"pixels": "jXUJCbJ8Cv/Xgw3//IoS/yGRGf9GmCKaa58t/5CmOv+1rUn/2rRa//+7bSskwoL/mKoM/72xDf/iuBD/B78V/yzGHH1RzSX/dtQw/5vbPf/A4kz/5eldDgrwcP8v94X/o98P/8jmEP/t7RP/EvQYYDf7H/9cAij/gQkz/6YQQP/LF0/x8B5g/xUlc/86LIj/rhQS/9MbE//4IhZDHSkb/0IwIv9nNyv/jD42/7FFQ9TWTFL/+1Nj/yBadv9FYYv/uUkV/95QFiYDVxn/KF4e/01lJf9ybC7/l3M5t7x6Rv/hgVX/Bohm/yuPef9Qlo5IxH4YCemFGf8OjBz/M5Mh/1iaKP99oTGaoqg8/8evSf/stlj/Eb1p/zbEfCtby5H/z7Mb//S6HP8ZwR//Psgk/2PPK32I1jT/rd0//9LkTP/361v/HPJsDkH5f/9mAJT/2uge///vH/8k9iL/Sf0nYG4ELv+TCzf/uBJC/90ZT/8CIF7xJydv/0wugv9xNZf/5R0h/wokIv8vKyVDVDIq/3k5Mf+eQDr/w0dF/+hOUtQNVWH/Mlxy/1djhf98apr/8FIk/xVZJSY6YCj/X2ct/4RuNP+pdT3/znxIt/ODVf8YimT/PZF1/2KYiP+Hn51I"
},
"width": 3,
"height": 20
}
},
{
"args": {
"x": 0,
"y": 0,
"input": {
"width": 4,
"height": 4,
"pixels": "LycDA1QuBP95NQf/njwM/zpcBv9fYwf/hGoK/6lxD/9FkQn/apgK/4+fDf+0phJaUMYM/3XNDf+a1BA9v9sV/w=="
},
"width": 0,
"height": 4
}
},
{
"args": {
"x": 0,
"y": 0,
"input": {
"width": 4,
"height": 4,
"pixels": "LycDA1QuBP95NQf/njwM/zpcBv9fYwf/hGoK/6lxD/9FkQn/apgK/4+fDf+0phJaUMYM/3XNDf+a1BA9v9sV/w=="
},
"width": 100000,
"height": 100000
}
},
{
"args": {
"x": 0,
"y": 0,
"input": {
"width": 2,
"height": 2,
"pixels": "AQID"
},
"width": 2,
"height": 2
}
}
]Versions (units)1›
- v1by dave33864f7d2cstable 1.1.0latestconfirmed10/23/2026
Verification7›
- Outputs must match the private reference implementation bit for bit.
- Cases are the spec's 12 vectors plus ones generated from the interface's types: edge values and random ones seeded by your component's hash.
- Components may import nothing but specs: no files, no network, no clock.
- Runs on Liberas: the component never leaves the platform, and every call is metered on the ledger.
- A remote call may execute up to 500,000,000 instructions.
- Already built: a component that passes and uses at most 0.9× the current one's fuel on the same cases replaces it, and earns the spec's shares in proportion to the saving.
- Found an input where the current component disagrees with the spec? Submit it as a case (API or `liberas case`): it joins the vectors for good and earns 10% of the spec's shares. A component that then passes replaces the broken one for 25%.