I figured it out!
In rescript.json you have to set an extenal stdlib.
"external-stdlib" : "@rescript/std"
And in deno.json:
"imports": {
"rescript": "npm:rescript@12.0.0-alpha.7",
"@rescript/std": "npm:@rescript/std@12.0.0-alpha.7",
/* ... */
}
There might be an opportunity to publish @rescript/std on JSR.