Make working with c-toxcore low-level api more easy
Mission:
- Create NodeJs wrapper for c-toxcore api (based on [c-toxcore])
- Create material web ui for tox client
- Create cross-platform tox client
Addon that provide using toxcore api in Node.js environment.
- Download the
- Build toxcore using these instructions
- Create new Visual Studio project with master of classic windows application (select app type as static library and remove check mark from precompiled header).
- Add this libs as a dependencies: advapi32.lib;iphlpapi.lib;psapi.lib;shell32.lib;ws2_32.lib;libsodium.lib (don't forget specify path of libsodium.lib placed folder. You need to build libsodium.lib from sources additionaly for your platform).
- Add exists elements: libsodium.lib, pthreadVC2.lib and toxcore.lib to project and build. Then you get one file *.lib, that contain above libs as one.
- Create empty folder and init new npm package:
npm init
npm install node-addon-api
- In file binding.gyp specify your own path to the include files and libs
- In package root, as administrator, type node-gyp clean configure build --verbose --arch=ia32
- Put
libsodium.dll
andpthreadVC2.dll
into root package folder. You must put these files in another projects that uses obtained ToxAddon. - Ok, you would get build folder where lay files ToxAddon.node and ToxAddon.lib. After that you may type
node index.js
and you would see "connected 2" over time. That works!
- Example provides in file
index.js
- You may call tox methods that contains in file
toxcore.c
. - You may install this addon as dependency package to another project.