# XO0609: a merged std module calls an intrinsic that is not portable

A std module merged with its implementation (decision 0588: std/M.xo holds the bodies) is compiled by every backend from those bodies, the Go backend included. It may `use native/rt`, but only for the intrinsics every backend implements (decision 0597): today `rt.cast`, the Bytes and Str view, which std/rt implements as Rt_cast. Memory intrinsics (`rt.mem_store`, `rt.mem_copy`) and the native/llrt modules exist only on the native backends. Only std's own modules can import native/rt, so user code never sees this. Write the call with prelude operations, or keep it in the module's std/native/M_native.xo behind a bodyless declaration in std/M.xo.

## Example

```xo
// std/url.xo (merged)
use native/rt

fn put(a: Int, v: Int) { rt.mem_store(a, 0, v, 1) }
```

## Fix

```xo
// std/url.xo (merged)
fn put(var b: BytesBuilder, v: Int) { b.write_byte(UInt8(v)) }
```

Run `xo explain XO0609` for this text in a terminal, or see
[section 10.6 of the specification](../../spec/core/#106-diagnostic-codes).

