Or-tools: Is there any plans for Javascript bindings for or-tools?

Created on 27 Sep 2015  Â·  5Comments  Â·  Source: google/or-tools

Just asking, is there any plans for Javascript bindings usable in Node.js for or-tools?

Most helpful comment

Hey, a quick follow up here. I tried giving the Swig approach a shot but it turned out to not be a great fit.

I then built some Node.js bindings for the routing model abstractions in or-tools:

https://github.com/mapbox/node-or-tools

It's still in its early stages (e.g. I'm currently working on packaging up pre-built binaries for npm, so all users have to do is npm install) but should already work well for simple use-cases.

All 5 comments

Not really :-(

Laurent Perron | Operations Research | [email protected] | (33) 1 42 68 53
00

2015-09-27 6:45 GMT+02:00 jack-zalora [email protected]:

Just asking, is there any plans for Javascript bindings usable in Node.js
for or-tools?

—
Reply to this email directly or view it on GitHub
https://github.com/google/or-tools/issues/94.

Are there ways at least we could achieve it?

I implemented a C++ NPM that uses or-tools, but the JavaScript bindings are proprietary (that is, they look nothing like the or-tools API). So I know it is feasible. I think a general-purpose NPM would bring tremendous value.

I have looked at swig.
You can generate node.js bindings.

There are multiple hurdles moving forward:

  • convert std::vector<> to javascripts arrays (back and forth)
  • protobufs. We are moving to protobuf 3, which supports translation to
    json, but making it right will be time consuming.

--Laurent

Laurent Perron | Operations Research | [email protected] | (33) 1 42 68 53
00

2015-11-29 19:38 GMT+01:00 Dave Causey [email protected]:

I implemented a C++ NPM that uses or-tools, but the JavaScript bindings
are proprietary (that is, they look nothing like the or-tools API). So I
know it is feasible. I think a general-purpose NPM would bring tremendous
value.

—
Reply to this email directly or view it on GitHub
https://github.com/google/or-tools/issues/94#issuecomment-160446407.

Hey, a quick follow up here. I tried giving the Swig approach a shot but it turned out to not be a great fit.

I then built some Node.js bindings for the routing model abstractions in or-tools:

https://github.com/mapbox/node-or-tools

It's still in its early stages (e.g. I'm currently working on packaging up pre-built binaries for npm, so all users have to do is npm install) but should already work well for simple use-cases.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

frodrigo picture frodrigo  Â·  5Comments

KeremAslan picture KeremAslan  Â·  3Comments

bhack picture bhack  Â·  4Comments

tapafe picture tapafe  Â·  4Comments

husamrahmanh2o picture husamrahmanh2o  Â·  4Comments