Re: [Csnd-dev] Building WASM plugin opcodes
Hlöðver Sigurðsson <[email protected]>
| Newsgroups | gmane.comp.audio.csound.devel |
|---|---|
| Message-ID | <CAB8vR8Lp-_E_W0qbyRw9mjkPhp7WZZ_b8bnpuy6deiu7_2dH+g@mail.gmail.com> |
There's a lot to unpack there. It's unnecessary complicated to do this atm. I would make a new nix file from one of the two plugin examples (one in c and the other in c++) and import it and build it. I recommend a chatGPT handy to help unpack the very undocumented parts there :) As Steven Yi mentioned in another thread, we want to continue simplify wasm builds and remove nix where nix isn't needed and incorporate more Cmake (which was perhaps done with emscripten PR recently?) "yarn link" will create a symlink to node_modules to develop changes quickly, it's more for developing the javascript wrapper than it is for building c/c++ plugin code. On Tue, 15 Oct 2024 at 17:16, Richard Knight <[email protected]> wrote: > Hi, > > I'd like to compile some plugin opcodes to use in the browser. As far as > I can follow this is possible with the repository example in wasm/src > but would like some advice/help with setting up the correct build > environment. > > I have no experience of any wasm toolchain but had a look at > wasm/README.md, this says run 'yarn link', but this fails with 'link not > found' or similar. I then used nix against wasm/src/csound.nix which > failed apparently when compiling LLVM, with an error that uintptr_t was > undefined, used in the function CleanupOnSignal. I then had a look at > wasm/scripts/compile.sh, which failed with a nix syntax error when I ran > it. > I'm using the latest Debian linux with latest packages etc. > > I am a bit confused about exactly what build tools need to be used and > in which order etc. Eg there is also the package.json file, does this > imply node is used in some step of the process too? > > Thanks > Richard >