Re: [Csnd-dev] Building WASM plugin opcodes
Richard Knight <[email protected]>
| Newsgroups | gmane.comp.audio.csound.devel |
|---|---|
| Organization | 1bpm |
| Message-ID | <[email protected]> |
OK thanks! I'll give it another go this evening and see what chatGPT knows.. I am also a bit unclear on how compiled plugin opcodes will work in the context of wasm - if I get that far. Eg if I have my wasm binary compiled from my plugin opcode, does the build process result in a single binary (ie linked csound and opcode) or the plugin binary in addition to the existing csound wasm binary.. and if the latter are there any particular steps that need to be taken to load the opcode binary? On 2024-10-15 15:45, Hlöðver Sigurðsson wrote: > 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