nx_print_e2e_test.nx
buildroot/runtime/nx_print_e2e_test.nx
about
nx_print_e2e_test.nx -- THE end-to-end integration demo. Single
runnable composes every shipped primitive into the operator-side
workflow:
1. Build a synthetic mesh (Voron-cube-style tetrahedron at unit
scale -- real STL load is operator-side via nx_stl_load_binary
on a file buffer; we use the synthetic mesh in-test).
2. Run the full slicer pipeline (nx_slice_pipeline) to produce
G-code into a memory buffer.
3. Write the G-code bytes to stdout (fd 1) so the operator can
pipe to a .gcode file.
4. Build the Moonraker POST /printer/print/start request bytes
for filename "cube.gcode" with API key "demo".
5. Write the Moonraker request bytes to stderr (fd 2) so the
operator can inspect / pipe them into curl / nc for upload.
6. Return 0 if every step succeeded.
Operator workflow:
$ ./nx_print_e2e > cube.gcode 2> moonraker.req
(then operator uploads cube.gcode + sends moonraker.req)
Assertions (in-test verification):
- G-code buffer non-empty + contains expected markers
- Moonraker request buffer non-empty + contains expected markers
- Both written to their respective fds
expect_exit: 0
license_tier: ORIGINAL
dependencies 9 imports · 0 importers
imports: nx_syscalls.nxnx_mesh.nxnx_mesh_print_check.nxnx_bvh.nxnx_machine_graph.nxnx_material_profile.nxnx_gcode_emit.nxnx_slice_pipeline.nxnx_moonraker_client.nx
imported by: nobody (leaf or entry point)
call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown
structs
| none |
consts
| 40 | const Q14: i64 = 16384 |
functions
| 42 | func smoke_contains(buf: *u8, len: i64, needle: *u8) -> i64 called by 1: main |
| 60 | func main() -> i64 |