WIP, POC of node js driver for pulsar backed by rust

Overview

WIP not ready at all, POC for node js rurt based pulsar driver

pulsar-node-rust-client

This project was bootstrapped by create-neon.

Installing pulsar-node-rust-client

Installing pulsar-node-rust-client requires a supported version of Node and Rust.

You can install the project with npm. In the project directory, run:

$ npm install

This fully installs the project, including installing any dependencies and running the build.

Building pulsar-node-rust-client

If you have already installed the project and only want to run the build, run:

$ npm run build

This command uses the cargo-cp-artifact utility to run the Rust build and copy the built library into ./index.node.

Exploring pulsar-node-rust-client

After building pulsar-node-rust-client, you can explore its exports at the Node REPL:

$ npm install
$ node
> require('.').hello()
"hello node"

Available Scripts

In the project directory, you can run:

npm install

Installs the project, including running npm run build.

npm build

Builds the Node addon (index.node) from source.

Additional cargo build arguments may be passed to npm build and npm build-* commands. For example, to enable a cargo feature:

npm run build -- --feature=beetle

npm build-debug

Alias for npm build.

npm build-release

Same as npm build but, builds the module with the release profile. Release builds will compile slower, but run faster.

npm test

Runs the unit tests by calling cargo test. You can learn more about adding tests to your Rust code from the Rust book.

Project Layout

The directory structure of this project is:

pulsar-node-rust-client/
├── Cargo.toml
├── README.md
├── index.node
├── package.json
├── src/
|   └── lib.rs
└── target/

Cargo.toml

The Cargo manifest file, which informs the cargo command.

README.md

This file.

index.node

The Node addon—i.e., a binary Node module—generated by building the project. This is the main module for this package, as dictated by the "main" key in package.json.

Under the hood, a Node addon is a dynamically-linked shared object. The "build" script produces this file by copying it from within the target/ directory, which is where the Rust build produces the shared object.

package.json

The npm manifest file, which informs the npm command.

src/

The directory tree containing the Rust source code for the project.

src/lib.rs

The Rust library's main module.

target/

Binary artifacts generated by the Rust build.

Learn More

To learn more about Neon, see the Neon documentation.

To learn more about Rust, see the Rust documentation.

To learn more about Node, see the Node documentation.

notes :

rm index.node ; npm install && node test.js

tu es dev et tu choppe un Error: internal error in Neon module: assertion failed: (left == right)``

Bah c'est ce que je te dis justement : ce panic il est là parce que le context est throwing a cause des panic precedents 11:26 Néon catch les panic pour pas que ça crash et set le context en throwing 11:26 Et quand le context est throwing tu peux pas faire de tasks faillible, genre des allocs avec boxed 11:27 D'où ton assert fail 11:27 C’est à cause des panics que y’a avant dans l’execution

TODO

  • doc
  • issue : manage schema
You might also like...
A terminal-based password manager, generator, and importer/exporter (Firefox, Chrome) backed with a concurrent hashmap
A terminal-based password manager, generator, and importer/exporter (Firefox, Chrome) backed with a concurrent hashmap

rucksack A terminal-based password manager, generator, and importer/exporter (Firefox, Chrome) backed with a concurrent hashmap Features Password gene

Simple template for building smart contract(Rust) and RPC Client(web3.js) on Solana (WIP) ⛏👷🚧⚠️
Simple template for building smart contract(Rust) and RPC Client(web3.js) on Solana (WIP) ⛏👷🚧⚠️

Solana BPF Boilerplate Simple template for building smart contract(Rust) and RPC Client(web3.js) on Solana This boilerplate provides the following. Si

Rust client to Seaport's APIs and Ethereum smart contracts(WIP)

Seaport-rs WIP - WORK IN PROGRESS. REFER TO https://github.com/Alcibiades-Capital/quay FOR PRODUCTION READY CODE I'm new to Rust and seek to be legend

⋰·⋰ Feeless is a Nano cryptocurrency node, wallet, tools, and Rust crate.

⋰·⋰ Feeless What is Feeless? Feeless is a Nano cryptocurrency node, wallet, tools, and Rust crate. This is not the official project for Nano, only an

Ecoball Node is the Official Rust implementation of the Ecoball protocol.

Ecoball Node is the Official Rust implementation of the Ecoball protocol. It is a fork of OpenEthereum - https://github.com/openethereum/

An ongoing Rust implementation of a Zcash node. 🦓
An ongoing Rust implementation of a Zcash node. 🦓

Contents Contents About Beta Releases Getting Started Known Issues Future Work Documentation Security License About Zebra is the Zcash Foundation's in

Open source Rust implementation of the Witnet decentralized oracle protocol, including full node and wallet backend  👁️🦀
Open source Rust implementation of the Witnet decentralized oracle protocol, including full node and wallet backend 👁️🦀

witnet-rust is an open source implementation of the Witnet Decentralized Oracle Network protocol written in Rust. Components witnet-rust implements ma

Clean implementation of TompHTTPs' Bare-server-node in rust!

bare-server-rust bare-server-rust is a fully compliant Rust implementation of TompHTTPs' Bare Server specifications. This is a server that will receiv

Polkadot Node Implementation

Polkadot Implementation of a https://polkadot.network node in Rust based on the Substrate framework. NOTE: In 2018, we split our implementation of "Po

Comments
  • test: Add a test container for pulsar

    test: Add a test container for pulsar

    Why

    Tests are launched manually, with an external pulsar docker container. It's not really handy to run all the matrix of tests.

    How to fix

    Test container allow running, without docker, a container in order to start a standalone pulsar instance for testing purpose.

    opened by CleverAkanoa 3
  • Checking out napi-rs for bindings

    Checking out napi-rs for bindings

    Not sure if this is really what you need, but you might want to checkout https://napi.rs/ for the bindings.

    I'm a Rust newbie so i might be totally wrong :D

    Awesome project in all cases. Thx :)

    opened by romainbrancourt 3
  • add dependabot to the repo

    add dependabot to the repo

    https://docs.github.com/en/code-security/supply-chain-security/keeping-your-dependencies-updated-automatically/enabling-and-disabling-dependabot-version-updates

    opened by waxzce 0
  • Write proper test.js to be executed

    Write proper test.js to be executed

    Small problem : add pulsar to the test dep to run it on action

    Second problem : which unit test framework choose in node ecosystem. I have to test only lib with no graphic rendering and both callback and promise based API. What is the simplest and durable lib here ? any idea @hsablonniere ?

    opened by waxzce 2
Owner
Clever Cloud
Industrialization & automation of your software factory. Empowering developers since 2010.
Clever Cloud
A node and runtime configuration for polkadot node.

MANTA NODE This repo is a fresh FRAME-based Substrate node, forked from substrate-developer-hub/substrate-node-templte ?? It links to pallet-manta-dap

Manta Network 14 Apr 25, 2021
Sample lightning node command-line app built on top of Ldk Node (similar to ldk-sample).

ldk-node-sample Sample lightning node command-line app built on top of Ldk Node (similar to ldk-sample ). Installation git clone https://github.com/op

optout 3 Nov 21, 2023
OXiDE - A PoC packer written in Rust

OXiDE is a PoC Rust packer. It doesn't do much other than compress the target binary, but if you read the code, you'll find that extending it to do more (e.g., obfuscation, anti-reversing) is very possible!

frank2 44 Nov 30, 2022
Quick poc of the rsync wire protocol in Rust. Supports delta transfer.

Rsync wire protocol in Rust This is a quick poc of the rsync wire protocol in Rust. It supports delta transfer. The code is really a mess right now, a

LightQuantum 4 Feb 18, 2023
EVM compatible chain with NPoS/PoC consensus

Reef Chain Reef chain is written in Rust. A basic familiarity with Rust tooling is required. To learn more about Reef chain, please refer to Documenta

Reef Finance 148 Dec 31, 2022
A framework for creating PoC's for Solana Smart Contracts in a painless and intuitive way

Solana PoC Framework DISCLAIMER: any illegal usage of this framework is heavily discouraged. Most projects on Solana offer a more than generous bug bo

Neodyme 165 Dec 18, 2022
A PoC backbone for NFT Marketplaces on NEAR Protocol

NFT Market Reference Implementation A PoC backbone for NFT Marketplaces on NEAR Protocol. Reference Changelog Changelog Progress: basic purchase of NF

null 9 May 26, 2022
Simple PoC to issue JSON Web Tokens (JWTs) with a canister on the Internet Computer.

JWT Issuer Proof of Concept Overview Simple PoC to issue JSON Web Tokens (JWTs) with a canister on the Internet Computer. It allows the issuance of tw

Dominic Wörner 7 Oct 13, 2022
Wangan Midnight MaxiTune 3DX+ Loader PoC

Required Packages Arch Linux nvidia-cg-toolkit mangohud lib32-glibc lib32-gcc-libs lib32-libx11 lib32-libxcb lib32-libpulse lib32-alsa-lib lib32-libxa

BroGamer 14 Mar 4, 2024
Mundane is a Rust cryptography library backed by BoringSSL that is difficult to misuse, ergonomic, and performant (in that order).

Mundane Mundane is a Rust cryptography library backed by BoringSSL that is difficult to misuse, ergonomic, and performant (in that order). Issues and

Google 1.1k Jan 3, 2023