[{"data":1,"prerenderedAt":21},["ShallowReactive",2],{"project-libmackie-building":3},{"page":4,"others":17},{"slug":5,"src":6,"title":7,"source":8,"toc":9,"html":16},"building","BUILDING.md","Building libmackie","https:\u002F\u002Fgithub.com\u002FFreeMixer\u002Flibmackie\u002Fblob\u002F3f45d99be73faaa3f2b103c300c42748cd719d99\u002FBUILDING.md",[10,13],{"id":11,"title":12},"tests","Tests",{"id":14,"title":15},"the-golden-bytes","The golden bytes","\u003Ch1 id=\"building-libmackie\">Building libmackie\u003C\u002Fh1>\n\u003Cp>A hand-kept Makefile, no build system to configure. You need a C11 compiler and \u003Ccode>make\u003C\u002Fcode>.\nNothing else: no library outside libc, not even libm.\u003C\u002Fp>\n\u003Cpre>\u003Ccode>make                          # libmackie.a\nmake shared                   # libmackie.so.&lt;version&gt;, with its soname links\nmake test                     # the unit suite, the same command CI runs\nmake install PREFIX=\u002Fusr\u002Flocal [DESTDIR=...]\nmake clean\n\u003C\u002Fcode>\u003C\u002Fpre>\n\u003Cp>The code is plain C11 built with \u003Ccode>-Wall -Wextra -Werror\u003C\u002Fcode>, so a warning is a build failure.\n\u003Ccode>CC\u003C\u002Fcode> and \u003Ccode>CFLAGS\u003C\u002Fcode> can be overridden on the command line; the warning flags are kept even then.\u003C\u002Fp>\n\u003Cp>\u003Ccode>make install\u003C\u002Fcode> copies the headers to \u003Ccode>$(PREFIX)\u002Finclude\u002Fmackie\u002F\u003C\u002Fcode>, the archive to\n\u003Ccode>$(PREFIX)\u002Flib\u003C\u002Fcode> (\u003Ccode>LIBDIR=\u003C\u002Fcode> to change it) and a pkg-config file, so a consumer builds with:\u003C\u002Fp>\n\u003Cpre>\u003Ccode>cc app.c $(pkg-config --cflags --libs libmackie)\n\u003C\u002Fcode>\u003C\u002Fpre>\n\u003Ch2 id=\"tests\">Tests\u003C\u002Fh2>\n\u003Cp>Every test runs through \u003Ccode>tests\u002Frun-test.sh\u003C\u002Fcode>, which gives it a timeout: a hang is a failure,\nnever a stalled build. A test that exits 77 proved this machine cannot host it and is reported\nas SKIP, never as a pass.\u003C\u002Fp>\n\u003Cul>\n\u003Cli>\u003Ccode>test_mcu\u003C\u002Fcode> is the TypeScript MCU suite ported case for case: faders, buttons, V-Pots,\nmeters, scribble strips, the handshake ground truth and the scribble backlights, with the\nrefusals a C API adds.\u003C\u002Fli>\n\u003Cli>\u003Ccode>test_golden\u003C\u002Fcode> holds every encoder and decoder to \u003Ccode>tests\u002Fgolden\u002Fmcu_golden.h\u003C\u002Fcode>, the bytes the\nTypeScript encoders sent and what the TypeScript decoders read for the same inputs, and\nchecks that what the encoders send decodes back to what they were given.\u003C\u002Fli>\n\u003Cli>\u003Ccode>test_install.sh\u003C\u002Fcode> installs into a scratch root and builds a consumer through pkg-config;\n\u003Ccode>conformance-packaging.sh\u003C\u002Fcode> holds the version and soname copies to one another;\n\u003Ccode>test_workflows.sh\u003C\u002Fcode> parses the CI workflows; \u003Ccode>public-sources-check.sh\u003C\u002Fcode> and its own test keep\nprivate names out of the tree and the history.\u003C\u002Fli>\n\u003C\u002Ful>\n\u003Ch2 id=\"the-golden-bytes\">The golden bytes\u003C\u002Fh2>\n\u003Cp>\u003Ccode>tests\u002Fgolden\u002Fmcu_golden.h\u003C\u002Fcode> is generated, and committed. To compare against a TypeScript MCU\nmodule (compiled to \u003Ccode>mcu.js\u003C\u002Fcode>, with its dependencies resolvable from where it sits):\u003C\u002Fp>\n\u003Cpre>\u003Ccode>node tools\u002Fgen-goldens.mjs path\u002Fto\u002Fmcu.js &gt; tests\u002Fgolden\u002Fmcu_golden.h\ngit diff tests\u002Fgolden\u002Fmcu_golden.h\n\u003C\u002Fcode>\u003C\u002Fpre>\n\u003Cp>A difference in the header is a change of wire bytes on one side or the other. The generator\ndraws its sampled inputs from a fixed seed, so the same module writes the same file.\u003C\u002Fp>\n",[18],{"slug":19,"title":20},"","libmackie",1793954996851]