sidorares / dbus-native

D-bus protocol client and server for node.js written in native javascript
Other
261 stars 93 forks source link

[proposal] Replace Long.js with native BigInt #248

Open acrisci opened 6 years ago

acrisci commented 6 years ago

BigInt is a native way to represent 64 bit integers (dbus type x) in node.

Available since version 10.8.0.

https://node.green/#ESNEXT-candidate--stage-3--BigInt

https://developers.google.com/web/updates/2018/05/bigint

Do you see any issues with that?

sidorares commented 6 years ago

I was thinking about it, but might be a bit too early? Maybe OK to go with migger api changes ( async/await etc ) in major version.

CyDragon80 commented 6 years ago

I created a PR https://github.com/sidorares/dbus-native/pull/252 with a potential interim solution to at least present the option of marshalling/unmarshalling BigInts when the feature is available. Over time it would probably make sense to shift towards the native type.