• Stars
    star
    113
  • Rank 303,561 (Top 7 %)
  • Language
    Rust
  • License
    Apache License 2.0
  • Created over 4 years ago
  • Updated 7 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

The original package manager for Motoko

Vessel

The original package manager for the Motoko programming language.

Getting started

  1. Download a copy of the vessel binary from the release page or build one yourself
    1. For Ubuntu in $HOME/bin RUN wget https://github.com/dfinity/vessel/releases/download/v0.6.4/vessel-linux64

      For macOS in /usr/local/bin RUN: wget https://github.com/dfinity/vessel/releases/download/v0.6.4/vessel-macos

    2. Rename vessel-linux64 to vessel eg: RUN mv vessel-linux64 vessel

    3. Change permissions, chmod +x vessel

  2. Run vessel init in your project root.
  3. Edit vessel.dhall to include your dependencies (potentially also edit package-set.dhall to include additional package sources)
  4. In a dfx project: Edit dfx.json under defaults->build->packtool to say "vessel sources" like so:
    ...
    "defaults": {
      "build": {
        "packtool": "vessel sources"
      }
    }
    ...
    
    Then run dfx build
  5. In a non-dfx project: Run $(vessel bin)/moc $(vessel sources) -wasi-system-api main.mo to compile the main.mo file with the installed packages in scope and using the wasi API to let you run the generated WASM with tools like wasmtime.

How it works

Vessel is inspired by the spago package manager for PureScript. Any git repository with a src/ directory is a valid package to Vessel, which is a flexible and lightweight approach to package management, that is easily extended with more guarantees and features as our community grows. The two concepts you need to understand to work with Vessel are package sets and the manifest file.

Package sets

Vessel uses the idea of a package set to manage where it pulls dependencies from. A package set is a collection of packages at certain versions that are known to compile together. The package set also specifies the dependencies between these packages, so that Vessel can find all the transitively needed packages to build your project. There will be a community maintained package set of publicly available, open source packages. You can then base your projects package set on the public one and extend it with your private and local packages. The package set your project uses is stored in the package-set.dhall file by default.

Manifest file

Your vessel.dhall file contains the list of packages you need for your project to build. Vessel will look at this file, and figure out all the transitive packages you need using the package set file. Optionally it also contains a compiler version that Vessel uses to download the compiler binaries for you. Any change to this file requires a reload of the language service so your packages can be picked up by your editor for now.

After Vessel has installed all required packages through cloning or downloading tarballs, it puts them in a project local location (the .vessel directory).

How Tos

How do I reset all caches?

Remove the .vessel directory in your project

How do I depend on a git branch of a package?

The "version" field in the package set format refers to any git ref so you can put a branch name, a commit hash or a tag in there.

CAREFUL: Vessel has no way of invalidating "moving" references like a branch name. If you push a new commit to the branch you'll need to run vessel install --force to bypass your local cache.

How do I add a local package to my package set?

Make sure your local package is a git repository, then add an entry like so to your additions in the package-set.dhall file:

let additions = [
   { name = "mypackage"
   , repo = "file:///home/path/to/mypackage"
   , version = "v1.0.0"
   , dependencies = ["base"]
   }
]

Now you can depend on this package by adding mypackage to your vessel.dhall file.

How do I integrate Vessel into my custom build?

Running vessel sources will return flags in a format you can pass directly to the various compiler tools. Running vessel bin returns the path containing the compiler binaries. Use like so: $(vessel bin)/mo-doc.

License

Vessel is distributed under the terms of the Apache License (Version 2.0).

See LICENSE for details.

More Repositories

1

ic

Internet Computer blockchain source: the client/replica software run by nodes
Rust
1,476
star
2

awesome-internet-computer

A curated list of awesome projects and resources relating to the Internet Computer Protocol
706
star
3

examples

Example applications, microservices, and code samples for the Internet Computer
JavaScript
502
star
4

motoko

Simple high-level language for writing Internet Computer canisters
OCaml
481
star
5

motoko-base

The Motoko base library
Motoko
473
star
6

internet-identity

Internet Identity, a blockchain authentication system for the Internet Computer
Rust
372
star
7

cancan

A scalable video sharing service.
TypeScript
334
star
8

candid

Candid Library for the Internet Computer
Rust
269
star
9

cdk-rs

Rust canister development kit for the Internet Computer.
Rust
193
star
10

linkedup

An open professional network.
JavaScript
155
star
11

sdk

IC SDK: a Software Development Kit for creating and managing canister smart contracts on the ICP blockchain.
Rust
154
star
12

docs

Documentation for writing code for the Internet Computer
Motoko
144
star
13

agent-js

A collection of libraries and tools for building software around the Internet Computer, in JavaScript.
TypeScript
142
star
14

agent-rs

A collection of libraries and tools for building software around the Internet Computer, in Rust.
Rust
118
star
15

nns-dapp

The Dapp of the Internet Computer's Network Nervous System.
Rust
89
star
16

quill

Governance & ledger toolkit for cold wallets
Rust
79
star
17

ICRC-1

A fungible token standard developed by the Ledger & Tokenization working group for the IC.
Rust
78
star
18

stable-structures

A collection of data structures for fearless canister upgrades.
Rust
77
star
19

oisy-wallet

A browser-based, multi-chain wallet hosted on the Internet Computer
TypeScript
71
star
20

ic-repl

Rust
70
star
21

portal

Internet Computer Developer Portal
TypeScript
67
star
22

motoko-playground

Motoko playground
TypeScript
65
star
23

ic-js

Libraries for interfacing with the Internet Computer.
JavaScript
60
star
24

cycles-wallet

DFINITY Cycles Wallet
TypeScript
55
star
25

grant-rfps

Grant RFPs and Bounties
51
star
26

rosetta-client

JavaScript
44
star
27

keysmith

Hierarchical Deterministic Key Derivation for the Internet Computer
Shell
44
star
28

invoice-canister

Providing an example and simplified experience for accepting payments in smart contracts
Motoko
43
star
29

vscode-motoko

Motoko language support for VS Code.
JavaScript
41
star
30

bitcoin-developer-preview

A preview of the integration between Bitcoin and the Internet Computer.
Rust
39
star
31

certified-assets

A certified assets canister written in Rust.
38
star
32

interface-spec

IC Interface Specification
JavaScript
36
star
33

ic-hs

A haskell toolbox for the Internet Computer
Haskell
35
star
34

bitcoin-canister

Rust
34
star
35

icp-eth-starter

An advanced starter project for interacting with Ethereum on the Internet Computer (Beta)
TypeScript
34
star
36

ic-wasm

A collection of libraries and tools for transforming Wasm canisters running on the Internet Computer
Rust
33
star
37

exchange-rate-canister

The exchange rate canister (XRC) makes use of the HTTP requests feature to provide exchange rates as a service to the IC.
Rust
32
star
38

ic-websocket-poc

Rust
30
star
39

gix-components

A collection of UI components and visual style for web applications
Svelte
30
star
40

prettier-plugin-motoko

A code formatter for the Motoko smart contract language.
TypeScript
29
star
41

icx-proxy

A rust-based command line tool to serve as a gateway for a Internet Computer replica.
Rust
28
star
42

icfront

TypeScript
27
star
43

ICRC

Repository to ICRC proposals
26
star
44

wg-identity-authentication

Repository of the Identity and Wallet Standards Working Group
TypeScript
25
star
45

bigmap-poc

Proof of concept of an infinitely scalable data storage for the Internet Computer application, written in Rust
Rust
25
star
46

http-proxy

Proof of concept implementation of the IC HTTP Gateway Protocol that enables end-to-end secure connections with dApps being served from the internet computer.
TypeScript
23
star
47

canister-profiling

Collection of canister performance benchmarks
Rust
21
star
48

motoko-dev-server

A live reload development server for Motoko smart contracts.
TypeScript
20
star
49

ic-docutrack

DocuTrack is a proof-of-concept dapp built on the Internet Computer for sharing and managing documents.
Svelte
19
star
50

node-ic0

An easy-to-use JavaScript API for the Internet Computer.
TypeScript
18
star
51

vessel-package-set

The official community package-set for vessel
Dhall
17
star
52

pocketic

A canister smart contract testing solution for the Internet Computer.
15
star
53

node-motoko

Compile and run Motoko smart contracts in Node.js or the browser.
TypeScript
15
star
54

response-verification

Client side response verification for the Internet Computer
Rust
14
star
55

snsdemo

Developer focused SNS deployment demo
Shell
12
star
56

hardware-wallet-cli

A CLI to interact with the Internet Computer App on Ledger Nano S/X devices.
JavaScript
12
star
57

erc20-icp

Contracts and canisters enabling ERC20 ICP on Ethereum
Rust
12
star
58

pocketic-py

PocketIC Python: A Canister Testing Library for the Internet Computer
Python
11
star
59

wg-governance

Repository of the governance working group
10
star
60

embed-motoko

Embed a custom Motoko code snippet in a Medium article, blog post, or webapp.
TypeScript
10
star
61

experimental-minting-tool

CLI tool for minting NFT's
Rust
10
star
62

sns-quill

SNS governance & ledger toolkit for cold wallets
Rust
9
star
63

motoko.rs

Motoko concrete syntax parser in Rust.
Rust
9
star
64

antora-sdk

Repo for website collaboration - antora project file and ui project files
CSS
9
star
65

getting-started

A repository for getting started on the Internet Computer
9
star
66

miracl_core_bls12381

Rust code of https://github.com/miracl/core (miracl_core) for curve BLS 12-381.
Rust
9
star
67

sns-testing

Testing SNS in local testing environment
Shell
8
star
68

icx-nns

Rust
8
star
69

rosetta-node

A passive node of the IC that can be interacted with using the Rosetta protocol
Rust
8
star
70

cycles-ledger

The cycles ledger is a global ledger canister that enables principal IDs to hold cycles.
Rust
8
star
71

canbench

A benchmarking framework for canisters on the Internet Computer.
Rust
8
star
72

test-state-machine-client

Rust library to interact with the ic-test-state-machine
Rust
8
star
73

threshold

Threshold voting and execution for the IC
Motoko
7
star
74

dre

Decentralized Reliability Engineering
Rust
7
star
75

ic-gamekit

C#
7
star
76

idl2json

Rust
6
star
77

dfx-extensions

Source repo for DFX extensions binaries and metadata
Rust
6
star
78

ic-staking-documentation

HTML
5
star
79

ledger-ref

The reference implementation of ICP ledger canister.
Motoko
5
star
80

setup-dfx

GitHub Action to set up dfx
5
star
81

feedback

An IC community feedback dapp powered by Motoko
TypeScript
5
star
82

nginx-modules

C
4
star
83

dfn-components

TypeScript
4
star
84

ic-quickjs-demo

Demo of embedding QuickJS in IC
Rust
4
star
85

dfxvm

dfx version manager
Rust
4
star
86

icp-dev-env

A Docker image for a canister smart contract developer environment for ICP.
Dockerfile
4
star
87

cns

Chain Name System, a trustless and decentralized discoverability layer hosted directly on the Internet Computer.
Rust
4
star
88

ic-types

DEPRECATED (A rust library containing typings and utility functions dealing with the Public specification of the Internet Computer.)
Rust
4
star
89

formal-models

TLA+ models of various IC components and canisters
TLA
3
star
90

wasmtime-hs

Haskell bindings to the wasmtime WASM engine
Haskell
3
star
91

metrics-encoder

Metrics encoder for Prometheus metrics
Rust
3
star
92

ic-mo-vm

Rust
3
star
93

rules_motoko

Motoko rules for Bazel.
Starlark
2
star
94

verifiable-credentials-sdk

Repository containing a set of libraries to manage the verifiable credentials in Internet Computer
TypeScript
2
star
95

ravm

JavaScript
2
star
96

icp-hello-world-motoko

A quick and easy way to develop for the Internet Computer in Motoko on macOS, Windows or Linux.
JavaScript
2
star
97

http-gateway

Monorepo including building blocks, reference implementations and examples for HTTP Gateway Protocol implementations
TypeScript
2
star
98

repositories-open-to-contributions

List of repositories where external contributions are accepted.
2
star
99

verify-bls-signatures

Verify BLS signatures
Rust
2
star
100

cla

DFINITY's Contributor Licence Agreement.
2
star