{"library":"slice2js","title":"slice2js","description":"slice2js is the official Slice-to-JavaScript compiler from ZeroC, part of the Ice RPC framework. It compiles Slice IDL files into JavaScript proxy and skeleton code for building networked applications. The current stable version is 3.7.110 (Ice 3.7.x series). Release cadence follows Ice releases, approximately every 6-12 months. Key differentiator: it's the native compiler for Ice's JavaScript mapping, tightly coupled with the @zeroc/ice npm package. Alternatives like protobuf or Thrift require separate toolchains.","language":"javascript","status":"active","last_verified":"Fri May 01","install":{"commands":["npm install slice2js"],"cli":{"name":"slice2js","version":null}},"imports":["const slice2js = require('slice2js'); slice2js.compile(['File.ice']);","const slice2js = require('slice2js'); const dir = slice2js.sliceDir;","const slice2js = require('slice2js');"],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"const slice2js = require('slice2js');\nconst path = require('path');\n\n// Compile a Slice file\nconst child = slice2js.compile(['Hello.ice'], {\n  cwd: '/path/to/slice',\n  stdio: 'inherit'\n});\n\nchild.on('close', (code) => {\n  if (code !== 0) {\n    console.error(`slice2js exited with code ${code}`);\n    process.exit(code);\n  } else {\n    console.log('Compilation succeeded');\n  }\n});\n\nconsole.log('Ice Slice directory:', slice2js.sliceDir);","lang":"javascript","description":"Demonstrates how to import slice2js, compile a Slice file, handle exit codes, and access the built-in Slice include path.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":null}