Bountiesterminal terminal prompt Hand it to a coding agent data-csv-write.wit data-csv-write.cases.json
data / data-csv-writeOpenRuns on Liberas
CSV write
rows written as delimited text after RFC 4180: each record's fields joined by delimiter and followed by CRLF (the last one too; no rows give empty text). A field is quoted (wrapped in '"', each '"' in it doubled) exactly when it contains delimiter, '"', CR or LF; no other field is quoted, including empty ones and ones with spaces. delimiter may be any character but '"', CR and LF (those are an error). A record with no fields is an error, as are more than 131,072 fields or more than 1,048,576 UTF-8 bytes of field text in all.
From your terminal
npm i -g https://liberas.dev/cli/liberas.tgzexport LIBERAS_URL=https://liberas.devliberas init data-csv-write --lang rustcd data-csv-write && 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 data-csv-write: 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)11 lines›
package root:component;
world root {
export liberas:data/csv-write@0.1.0;
}
package liberas:data@0.1.0 {
interface csv-write {
write: func(rows: list<list<string>>, delimiter: char) -> result<string, string>;
}
}
Test vectors12›
[
{
"args": {
"rows": [
[
"aaa",
"bbb",
"ccc"
],
[
"zzz",
"yyy",
"xxx"
]
],
"delimiter": ","
}
},
{
"args": {
"rows": [
[
"a,b",
"say \"hi\"",
"line\r\nbreak",
"cr\r",
"lf\n"
]
],
"delimiter": ","
}
},
{
"args": {
"rows": [
[
""
],
[
"",
""
],
[
" a ",
"b"
]
],
"delimiter": ","
}
},
{
"args": {
"rows": [],
"delimiter": ","
}
},
{
"args": {
"rows": [
[
"x;y",
"x,y",
"x\ty"
]
],
"delimiter": ";"
}
},
{
"args": {
"rows": [
[
"a",
"b\tc"
]
],
"delimiter": "\t"
}
},
{
"args": {
"rows": [
[
"é",
"한글",
"😀"
]
],
"delimiter": "한"
}
},
{
"args": {
"rows": [
[
"a"
],
[]
],
"delimiter": ","
}
},
{
"args": {
"rows": [
[
"a"
]
],
"delimiter": "\""
}
},
{
"args": {
"rows": [
[
"a"
]
],
"delimiter": "\r"
}
},
{
"args": {
"rows": [
[
"a"
]
],
"delimiter": "\n"
}
},
{
"args": {
"rows": [
[
"\""
],
[
"\"\""
]
],
"delimiter": ","
}
}
]Verification6›
- 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.
- Unbuilt, the bounty rises 10% of its shares every 7 days, up to +100%.