Giter Site home page Giter Site logo

holochain-nodejs's Introduction

holochain-nodejs

NodeJS Holochain Conductor.

Wraps the rust conductor in node.

Installation

Uses Holonix: https://github.com/holochain/holonix

Requires nix-shell same as Holochain Core (native or VM).

Usage

Nix shell prefix: hcnjs-*

Nix shell commands

hcnjs-conductor-install

Compiles the nodejs conductor binary from source and installs in $CARGO_HOME.

Intended for development and testing only.

License

License: GPL v3

Copyright (C) 2019, Holochain Foundation

This program is free software: you can redistribute it and/or modify it under the terms of the license p rovided in the LICENSE file (GPLv3). This program is distributed in the hope that it will be useful, bu t WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Note: We are considering other 'looser' licensing options (like MIT license) but at this stage are using GPL while we're getting the matter sorted out. See this article for some of our thinking on licensing for distributed application frameworks.

holochain-nodejs's People

Contributors

thedavidmeister avatar willemolding avatar connoropolous avatar sphinxc0re avatar lucksus avatar zippy avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar Captain avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar DC avatar  avatar

Watchers

 avatar Arthur Brock avatar Perry Kundert avatar  avatar James Cloos avatar Chris Gagne avatar Robbie Carlton avatar Sam Cooley avatar Carmelo Piccione avatar Julio Holon avatar  avatar Zeeshan Abid avatar ThetaSinner avatar  avatar UnsafeCell<MaybeUninit<Anxiety<T>>> avatar Joel Ulahanna avatar  avatar

holochain-nodejs's Issues

Windows travis build

CI does not generate binaries for windows. Travis supports building rust projects under windows but the build script does not run correctly

Add tests for rust and js

If this is to become part of holochain cmd it must be robust.

  • Rusts test should be added to the native code
  • js tests (tape?) should be used to ensure the module works
  • All tests should be run by the CI

`npm run install` fails with "neon.o: No such file or directory"

I've searched around for similar errors and this seems related: neon-bindings/neon#186. It's due to node-gyp, but I don't know how to diagnose this since this issue was from a year and a half ago.

Full error output:

npm run install

> [email protected] install /Users/michael/Holo/holochain-nodejs
> neon build

neon info forcing rebuild for new build settings
neon info running cargo
   Compiling either v1.5.0
   Compiling winapi-build v0.1.1
   Compiling libc v0.2.43
   Compiling version_check v0.1.4
   Compiling winapi v0.2.8
   Compiling num-traits v0.2.5
   Compiling serde v0.8.23
   Compiling ryu v0.2.6
   Compiling serde v1.0.78
   Compiling utf8-ranges v0.1.3
   Compiling regex-syntax v0.3.9
   Compiling typenum v1.10.0
   Compiling proc-macro2 v0.4.19
   Compiling num-integer v0.1.39
   Compiling linked-hash-map v0.5.1
   Compiling unicode-xid v0.1.0
   Compiling regex v0.2.11
   Compiling lazy_static v0.2.11
   Compiling num-bigint v0.2.0
   Compiling ucd-util v0.1.1
   Compiling itoa v0.4.3
   Compiling indexmap v1.0.1
   Compiling cfg-if v0.1.5
   Compiling num-complex v0.2.0
   Compiling num-rational v0.2.1
   Compiling crunchy v0.1.6
   Compiling utf8-ranges v1.0.1
   Compiling num-iter v0.1.37
   Compiling byteorder v1.2.6
   Compiling futures v0.1.24
   Compiling arrayref v0.3.5
   Compiling byte-tools v0.2.0
   Compiling safemem v0.2.0
   Compiling runtime-fmt v0.3.0
   Compiling regex v1.0.5
   Compiling fake-simd v0.1.2
   Compiling gcc v0.3.54
   Compiling rand_core v0.2.1
   Compiling neon-build v0.2.0
   Compiling sha1 v0.5.0
   Compiling nan-preserving-float v0.1.0
   Compiling remove_dir_all v0.5.1
   Compiling same-file v1.0.3
   Compiling memory_units v0.3.0
   Compiling unwrap_to v0.1.0
   Compiling snowflake v1.3.0
   Compiling bitflags v1.0.4
   Compiling holochain_agent v0.1.0 (https://github.com/holochain/holochain-rust?branch=develop#a2e6d620)
   Compiling semver-parser v0.7.0
   Compiling cslice v0.2.0
   Compiling futures-core-preview v0.2.3
   Compiling kernel32-sys v0.2.2
   Compiling lazy_static v1.1.0
   Compiling iovec v0.1.2
   Compiling memchr v0.1.11
   Compiling num_cpus v1.8.0
   Compiling memchr v1.0.2
   Compiling memchr v2.0.2
   Compiling rand v0.4.3
   Compiling time v0.1.40
   Compiling yaml-rust v0.4.0
   Compiling regex-syntax v0.5.6
   Compiling regex-syntax v0.6.2
   Compiling log v0.4.5
   Compiling block-buffer v0.3.3
   Compiling parity-wasm v0.31.3
   Compiling serde_test v0.8.23
   Compiling base64 v0.9.2
   Compiling neon v0.2.0
   Compiling holochain-node v0.1.0 (/Users/michael/Holo/holochain-nodejs/native)
   Compiling rand v0.5.5
   Compiling walkdir v2.2.5
   Compiling futures-channel-preview v0.2.2
   Compiling semver v0.9.0
   Compiling futures-io-preview v0.2.2
   Compiling bytes v0.4.10
   Compiling futures-cpupool v0.1.8
   Compiling aho-corasick v0.5.3
   Compiling nom v3.2.1
   Compiling aho-corasick v0.6.8
   Compiling uuid v0.6.5
   Compiling linked-hash-map v0.3.0
   Compiling wasmi v0.3.0
   Compiling futures-sink-preview v0.2.2
   Compiling tempfile v3.0.3
   Compiling num-traits v0.1.43
   Compiling quote v0.6.8
   Compiling tiny-keccak v1.4.2
   Compiling thread-id v2.0.0
   Compiling futures-util-preview v0.2.2
   Compiling thread_local v0.3.6
   Compiling generic-array v0.9.0
   Compiling chrono v0.4.6
   Compiling syn v0.15.3
   Compiling syn v0.14.9
   Compiling thread_local v0.2.7
   Compiling digest v0.7.5
   Compiling futures-executor-preview v0.2.2
   Compiling toml v0.4.6
   Compiling serde_json v1.0.27
   Compiling regex v0.1.80
   Compiling serde_derive v1.0.78
   Compiling num-derive v0.2.2
   Compiling neon-runtime v0.2.0
   Compiling sha2 v0.7.1
   Compiling futures-stable-preview v0.2.3
   Compiling num v0.2.0
   Compiling serde-hjson v0.8.1
   Compiling multihash v0.8.0
   Compiling futures-async-runtime-preview v0.2.3
   Compiling rust-base58 v0.0.4
   Compiling futures-preview v0.2.2
error: failed to run custom build command for `neon-runtime v0.2.0`
process didn't exit successfully: `/Users/michael/Holo/holochain-nodejs/native/target/debug/build/neon-runtime-708e712235b867a4/build-script-build` (exit code: 101)
--- stdout
Skipping node-gyp installation as part of npm install.
up to date in 1.452s

> @ build-debug /Users/michael/.cargo/registry/src/github.com-1ecc6299db9ec823/neon-runtime-0.2.0
> node-gyp build --debug

make: Nothing to be done for `all'.
TARGET = Some("x86_64-apple-darwin")
TARGET = Some("x86_64-apple-darwin")
HOST = Some("x86_64-apple-darwin")
AR_x86_64-apple-darwin = None
AR_x86_64_apple_darwin = None
HOST_AR = None
AR = None
TARGET = Some("x86_64-apple-darwin")
TARGET = Some("x86_64-apple-darwin")
running: "ar" "crs" "/Users/michael/Holo/holochain-nodejs/native/target/debug/build/neon-runtime-ae4a9fb4009502e4/out/libneon.a" "build/Debug/obj.target/neon/src/neon.o"
cargo:warning=ar: build/Debug/obj.target/neon/src/neon.o: No such file or directory
exit code: 1

--- stderr
thread 'main' panicked at '

Internal error occurred: Command "ar" "crs" "/Users/michael/Holo/holochain-nodejs/native/target/debug/build/neon-runtime-ae4a9fb4009502e4/out/libneon.a" "build/Debug/obj.target/neon/src/neon.o" with args "ar" did not execute successfully (status code exit code: 1).

', /Users/michael/.cargo/registry/src/github.com-1ecc6299db9ec823/gcc-0.3.54/src/lib.rs:1670:5
note: Run with `RUST_BACKTRACE=1` for a backtrace.

Add fallback to build from source

When attempting to install from npm on a platform for which there are no binaries the library should use neon build to attempt to build from source

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.