The Daml smart contract language
Go to file
gleber aa70c7f64e
Enforce consistent formatting of BUILD files. (#412)
* Add buildifier targets.

The tool allows to check and format BUILD files in the repo.

To check if files are well formatted, run:

    bazel run //:buildifier

To fix badly-formatted files run:

    bazel run //:buildifier-fix

* Cleanup dade-copyright-headers formatting.

* Fix dade-copyright-headers on files with just the copyright.

* Run buildifier automatically on CI via 'fmt.sh'.

* Reformat all BUILD files with buildifier.

Excludes autogenerated Bazel files.
2019-04-12 13:10:16 +02:00
.github pull request template: add note on external contributions (#386) 2019-04-11 14:43:51 +02:00
.vscode open-sourcing daml 2019-04-04 09:33:38 +01:00
3rdparty Enforce consistent formatting of BUILD files. (#412) 2019-04-12 13:10:16 +02:00
bazel_tools Enforce consistent formatting of BUILD files. (#412) 2019-04-12 13:10:16 +02:00
build-scripts fixes inconsistent help about Sandbox port 2019-04-04 13:03:48 +02:00
ci push releases to github (#413) 2019-04-12 11:30:13 +01:00
compiler Enforce consistent formatting of BUILD files. (#412) 2019-04-12 13:10:16 +02:00
da-assistant Enforce consistent formatting of BUILD files. (#412) 2019-04-12 13:10:16 +02:00
daml-assistant Enforce consistent formatting of BUILD files. (#412) 2019-04-12 13:10:16 +02:00
daml-foundations Enforce consistent formatting of BUILD files. (#412) 2019-04-12 13:10:16 +02:00
daml-lf Enforce consistent formatting of BUILD files. (#412) 2019-04-12 13:10:16 +02:00
dev-env Enforce consistent formatting of BUILD files. (#412) 2019-04-12 13:10:16 +02:00
docs Enforce consistent formatting of BUILD files. (#412) 2019-04-12 13:10:16 +02:00
extractor Enforce consistent formatting of BUILD files. (#412) 2019-04-12 13:10:16 +02:00
ghc-lib Windows CI (#364) 2019-04-11 14:26:55 +02:00
hazel open-sourcing daml 2019-04-04 09:33:38 +01:00
infra infra: VSTS agent improvements (#369) 2019-04-11 17:11:14 +02:00
language-support Enforce consistent formatting of BUILD files. (#412) 2019-04-12 13:10:16 +02:00
ledger Enforce consistent formatting of BUILD files. (#412) 2019-04-12 13:10:16 +02:00
ledger-api Enforce consistent formatting of BUILD files. (#412) 2019-04-12 13:10:16 +02:00
libs-haskell Enforce consistent formatting of BUILD files. (#412) 2019-04-12 13:10:16 +02:00
navigator Enforce consistent formatting of BUILD files. (#412) 2019-04-12 13:10:16 +02:00
nix Enforce consistent formatting of BUILD files. (#412) 2019-04-12 13:10:16 +02:00
notices-gen Enforce consistent formatting of BUILD files. (#412) 2019-04-12 13:10:16 +02:00
oss-compliance update all references of old repo to new repo 2019-04-04 16:20:07 +02:00
pipeline/samples Enforce consistent formatting of BUILD files. (#412) 2019-04-12 13:10:16 +02:00
rattle Prototype to accelerate Windows development (#411) 2019-04-12 10:45:11 +01:00
release Enforce consistent formatting of BUILD files. (#412) 2019-04-12 13:10:16 +02:00
replacements open-sourcing daml 2019-04-04 09:33:38 +01:00
rules_daml Enforce consistent formatting of BUILD files. (#412) 2019-04-12 13:10:16 +02:00
scala-protoc-plugins Enforce consistent formatting of BUILD files. (#412) 2019-04-12 13:10:16 +02:00
sdk Enforce consistent formatting of BUILD files. (#412) 2019-04-12 13:10:16 +02:00
web-ide web ide: secure docker containers through networks (#304) 2019-04-08 19:31:13 +00:00
.bazelignore open-sourcing daml 2019-04-04 09:33:38 +01:00
.dadew windows: fixed SHA256_TEXT daml-lf/interpreter test; less tools in dadew (#400) 2019-04-12 10:44:03 +02:00
.dockerignore open-sourcing daml 2019-04-04 09:33:38 +01:00
.envrc open-sourcing daml 2019-04-04 09:33:38 +01:00
.gitattributes open-sourcing daml 2019-04-04 09:33:38 +01:00
.gitignore Prototype to accelerate Windows development (#411) 2019-04-12 10:45:11 +01:00
.hlint.yaml open-sourcing daml 2019-04-04 09:33:38 +01:00
.scalafmt.conf open-sourcing daml 2019-04-04 09:33:38 +01:00
.stylish-haskell.yaml open-sourcing daml 2019-04-04 09:33:38 +01:00
.watchmanconfig open-sourcing daml 2019-04-04 09:33:38 +01:00
azure-pipelines.yml push releases to github (#413) 2019-04-12 11:30:13 +01:00
BAZEL-haskell.md update all references of old repo to new repo 2019-04-04 16:20:07 +02:00
BAZEL-JVM.md open-sourcing daml 2019-04-04 09:33:38 +01:00
BAZEL.md Stdlib package (#229) 2019-04-05 18:11:13 +02:00
BUILD Enforce consistent formatting of BUILD files. (#412) 2019-04-12 13:10:16 +02:00
build.ps1 windows: fixed SHA256_TEXT daml-lf/interpreter test; less tools in dadew (#400) 2019-04-12 10:44:03 +02:00
build.sh fmt.sh: format and lint checks (#349) 2019-04-10 14:22:35 +02:00
CHANGELOG open-sourcing daml 2019-04-04 09:33:38 +01:00
CODE_OF_CONDUCT.md open-sourcing daml 2019-04-04 09:33:38 +01:00
CONTRIBUTING.md Clean up the guidelines for PR title/description (#427) 2019-04-12 11:33:11 +01:00
COPY HOTFIX rename COPYRIGHT so github correctly shows apache2 license for repo (#274) 2019-04-05 22:10:47 -04:00
daml-logo.png open-sourcing daml 2019-04-04 09:33:38 +01:00
dependencies.yaml Move POM file generation to Bazel rules (#374) 2019-04-11 11:24:52 +02:00
deps.bzl Enforce consistent formatting of BUILD files. (#412) 2019-04-12 13:10:16 +02:00
dotfiles open-sourcing daml 2019-04-04 09:33:38 +01:00
fmt.sh Enforce consistent formatting of BUILD files. (#412) 2019-04-12 13:10:16 +02:00
LICENSE open-sourcing daml 2019-04-04 09:33:38 +01:00
NOTICES open-sourcing daml 2019-04-04 09:33:38 +01:00
package.json Map Protobuf's 64 bit integers to strings in JS (#324) 2019-04-09 15:19:32 +02:00
README.md Apache2 badge (#272) 2019-04-05 20:48:32 -04:00
release-dry-run.sh open-sourcing daml 2019-04-04 09:33:38 +01:00
scalafmt.sh open-sourcing daml 2019-04-04 09:33:38 +01:00
tsconfig.json open-sourcing daml 2019-04-04 09:33:38 +01:00
VERSION Release 0.12.1 2019-04-04 17:14:35 +01:00
WORKSPACE Enforce consistent formatting of BUILD files. (#412) 2019-04-12 13:10:16 +02:00
yarn.lock open-sourcing daml 2019-04-04 09:33:38 +01:00

DAML logo

Build Status Build Status License

Copyright 2019 Digital Asset (Switzerland) GmbH and/or its affiliates. All Rights Reserved. SPDX-License-Identifier: Apache-2.0

Welcome to the DAML repository!

This repository hosts all code for the DAML smart contract language and SDK, originally created by Digital Asset. DAML is an open-source smart contract language for building future-proof distributed applications on a safe, privacy-aware runtime. The DAML SDK is a set of tools to help you develop applications based on DAML.

To start using DAML

To download DAML, follow the installation instructions on docs.daml.com. To try out using it, follow the quickstart guide.

If you have questions about how to use DAML or how to build DAML-based solutions, please ask them on StackOverflow using the daml tag.

To start contributing to the DAML SDK

We warmly welcome contributions. To get set up for contributing to the SDK, follow these instructions:

1. Clone this repository

git clone git@github.com:digital-asset/daml.git.

2. Set up the DA Development Environment ("dev-env")

dev-env provides dependencies required during the build phase, like Java, Bazel, and Python for some tooling scripts. The code itself is built using Bazel.

Set up dev-env on Linux or macOS

  1. Use cd daml to switch into the new daml repository you just cloned
  2. Install Nix by running: bash <(curl https://nixos.org/nix/install)
  3. Enter dev-env by running: eval "$(dev-env/bin/dade assist)"

If you don't want to enter dev-env manually each time using eval "$(dev-env/bin/dade assist)", you can also install direnv. This repo already provides a .envrc file, with an option to add more in a .envrc.private file.

Set up dev-env on Windows

We're working on Windows support (for both end users and developers), but it's not ready yet. Sign up to be notified when it is available.

3. Build the source code

Run bazel build //...

This builds the code, and will likely take an hour or more.

Now you've built, rebuilding the code after a change will be much faster because Bazel caches unchanged build artefacts. To read more about Bazel and how to use it, see the Bazel site.

To run the tests, run bazel test //...

4. Contribute!

If you are looking for ideas on how to contribute, please browse our issues.

Caching: build speed and disk space considerations

Bazel has a lot of nice properties, but they come at the cost of frequently rebuilding "the world". To make that bearable, we make extensive use of caching. Most artifacts should be cached in our CDN, which is configured in .bazelrc in this project.

However, even then, you may end up spending a lot of time (and bandwidth!) downloading artifacts from the CDN. To alleviate that, by default, our build will create a subfolder .bazel-cache in this project and keep an on-disk cache. This can take about 10GB at the time of writing.

To disable the disk cache, remove the following lines:

build:linux --disk_cache=.bazel-cache
build:darwin --disk_cache=.bazel-cache

from the .bazelrc file.

If you work with multiple copies of this repository, you can point all of them to the same disk cache by overwriting these configs in either a .bazelrc.local file in each copy, or a ~/.bazelrc file in your home directory.