Skip to content

Commit 6ada268

Browse files
authored
Merge pull request #99 from mlabs-haskell/bladyjoker/milestone-docs
Milestone docs
2 parents 50cadc5 + ac4073e commit 6ada268

File tree

20 files changed

+724
-1615
lines changed

20 files changed

+724
-1615
lines changed

README.md

Lines changed: 15 additions & 72 deletions
Original file line numberDiff line numberDiff line change
@@ -45,81 +45,24 @@ competitors if your project requires:
4545

4646
## Documentation
4747

48-
- [Design](./docs/design.md),
49-
- [Compiler](./docs/compiler.md),
50-
- [Codegen](./docs/codegen.md),
51-
- [Comparison matrix](./docs/comparison-matrix.md),
52-
- [User feedback](.docs/feedback)
48+
Visit [LambdaBuffers Github Pages](https://mlabs-haskell.github.io/lambda-buffers).
5349

54-
## Getting started
50+
## Acknowledgements
5551

56-
### Installing Nix
52+
This project was graciously funded by the Cardano Treasury in [Catalyst Fund 9](https://cardano.ideascale.com/c/idea/421376).
5753

58-
This repository relies heavily on the [Nix Package
59-
Manager](https://nixos.org/download.html) for both development and package
60-
distribution.
54+
Authors:
6155

62-
To install run the following command:
56+
- [Drazen Popovic](https://github.com/bladyjoker)
57+
- [Vlad Posmangiu Luchian](https://github.com/cstml)
58+
- [Sean Hunter](https://github.com/gnumonik)
6359

64-
```sh
65-
sh <(curl -L https://nixos.org/nix/install) --daemon
66-
```
60+
Contributors:
6761

68-
and follow the instructions.
69-
70-
```sh
71-
$ nix --version
72-
nix (Nix) 2.8.0
73-
```
74-
75-
> NOTE: The repository should work with Nix version greater or equal to 2.8.0.
76-
77-
Make sure to enable [Nix Flakes](https://nixos.wiki/wiki/Flakes#Enable_flakes)
78-
and IFD by editing either `~/.config/nix/nix.conf` or `/etc/nix/nix.conf` on
79-
your machine and add the following configuration entries:
80-
81-
```yaml
82-
experimental-features = nix-command flakes
83-
allow-import-from-derivation = true
84-
```
85-
86-
Optionally, to improve build speed, it is possible to set up a binary caches
87-
maintained by IOHK and Plutonomicon by setting additional configuration entries:
88-
89-
```yaml
90-
substituters = https://cache.nixos.org https://iohk.cachix.org https://cache.iog.io https://public-plutonomicon.cachix.org
91-
trusted-public-keys = cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY= hydra.iohk.io:f/Ea+s+dFdN+3Y/G+FDgSq+a5NEWhJGzdjvKNGv0/EQ= iohk.cachix.org-1:DpRUyj7h7V830dp/i6Nti+NEO2/nhblbov/8MW7Rqoo= public-plutonomicon.cachix.org-1:3AKJMhCLn32gri1drGuaZmFrmnue+KkKrhhubQk/CWc=
92-
```
93-
94-
### Building and development
95-
96-
To facilitate seamlessly moving between directories and associated Nix
97-
development shells we use [direnv](https://direnv.net) and
98-
[nix-direnv](https://github.com/nix-community/nix-direnv):
99-
100-
To install both using `nixpkgs`:
101-
102-
```sh
103-
nix profile install nixpkgs#direnv
104-
nix profile install nixpkgs#nix-direnv
105-
```
106-
107-
Your shell and editors should pick up on the `.envrc` files in different
108-
directories and prepare the environment accordingly. Use `direnv allow` to
109-
enable the direnv environment and `direnv reload` to reload it when necessary.
110-
111-
Additionally, throughout the repository one can use:
112-
113-
```sh
114-
$ pre-commit run --all
115-
cabal-fmt............................................(no files to check)Skipped
116-
fourmolu.................................................................Passed
117-
hlint....................................................................Passed
118-
markdownlint.............................................................Passed
119-
nix-linter...............................................................Passed
120-
nixpkgs-fmt..............................................................Passed
121-
shellcheck...........................................(no files to check)Skipped
122-
typos....................................................................Passed
123-
```
124-
125-
To run all the code quality tooling specified in the [pre-commit-check config file](./pre-commit.nix)
62+
- [George Flerovsky](https://github.com/GeorgeFlerovsky)
63+
- [Andrea Ciceri](https://github.com/aciceri)
64+
- [Julia Chatain](https://juliachatain.com)
65+
- [Andrea Vezzosi](https://github.com/saizan)
66+
- [Magnus Viernickel](https://github.com/MangoIV)
67+
- [Rajdeep Chase Maity](https://github.com/TotallyNotChase)
68+
- [Ramiro Garay](https://github.com/rmgaray)
File renamed without changes.

api/build.nix

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
{ pkgs, pbnix-lib, commonTools, shellHook }:
2+
rec {
3+
devShell = pkgs.mkShell {
4+
name = "protos-env";
5+
buildInputs = [
6+
pkgs.protobuf
7+
pkgs.haskellPackages.proto-lens-protoc
8+
pkgs.protoc-gen-doc
9+
] ++ builtins.attrValues commonTools;
10+
11+
inherit shellHook;
12+
};
13+
14+
packages = {
15+
lambda-buffers-lang-hs-pb = pbnix-lib.haskellProto {
16+
inherit pkgs;
17+
src = ./.;
18+
proto = "lang.proto";
19+
cabalPackageName = "lambda-buffers-lang-pb";
20+
};
21+
22+
lambda-buffers-compiler-hs-pb = pbnix-lib.haskellProto {
23+
inherit pkgs;
24+
src = ./.;
25+
proto = "compiler.proto";
26+
cabalBuildDepends = [ packages.lambda-buffers-lang-hs-pb ];
27+
cabalPackageName = "lambda-buffers-compiler-pb";
28+
};
29+
30+
lambda-buffers-codegen-hs-pb = pbnix-lib.haskellProto {
31+
inherit pkgs;
32+
src = ./.;
33+
proto = "codegen.proto";
34+
cabalBuildDepends = [ packages.lambda-buffers-lang-hs-pb ];
35+
cabalPackageName = "lambda-buffers-codegen-pb";
36+
};
37+
38+
lambda-buffers-api-docs = pkgs.stdenv.mkDerivation {
39+
src = ./.;
40+
name = "lambdabuffers-api-docs";
41+
buildInputs = [
42+
pkgs.protobuf
43+
];
44+
buildPhase = ''
45+
mkdir $out;
46+
protoc --plugin=${pkgs.protoc-gen-doc}/bin/protoc-gen-doc lang.proto compiler.proto codegen.proto --doc_out=$out --doc_opt=markdown,api.md;
47+
'';
48+
};
49+
};
50+
}

lambda-buffers-proto/codegen.proto renamed to api/codegen.proto

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
syntax = "proto3";
22

3-
package lambdabuffers;
3+
package lambdabuffers.codegen;
44

55
import "lang.proto";
66

lambda-buffers-proto/compiler.proto renamed to api/compiler.proto

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
syntax = "proto3";
22

3-
package lambdabuffers;
3+
package lambdabuffers.compiler;
44

55
import "lang.proto";
66

File renamed without changes.
File renamed without changes.

docs/SUMMARY.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,12 @@
11
# Summary
22

3+
- [Introduction](introduction.md)
4+
- [Getting started](getting-started.md)
5+
- [LambdaBuffers to Haskell](haskell.md)
6+
- [LambdaBuffers to Purescript](purescript.md)
37
- [Design](design.md)
8+
- [API](api.md)
49
- [Compiler](compiler.md)
5-
- [Compiler API](compiler-api.md)
610
- [Codegen](codegen.md)
711
- [Command line interface](command-line-interface.md)
812
- [Comparison matrix](comparison-matrix.md)

docs/build.nix

Lines changed: 18 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,21 @@
1-
{ pkgs, commonTools, shellHook }:
2-
pkgs.mkShell {
3-
name = "docs-env";
1+
{ inputs, lib, ... }: {
2+
perSystem = { pkgs, system, inputs', config, ... }:
3+
{
4+
devShells.dev-docs = pkgs.mkShell {
5+
name = "docs-env";
6+
packages = [ pkgs.mdbook ];
7+
shellHook = config.pre-commit.installationScript;
8+
};
49

5-
packages = [ commonTools.markdownlint-cli commonTools.typos pkgs.mdbook ];
10+
packages.lambda-buffers-book = pkgs.stdenv.mkDerivation {
11+
src = ./.;
12+
name = "lambda-buffers-book";
13+
buildInputs = [ pkgs.mdbook ];
14+
buildPhase = ''
15+
cp ${config.packages.lambda-buffers-api-docs}/api.md api.md;
16+
mdbook build . --dest-dir $out
17+
'';
18+
};
619

7-
inherit shellHook;
20+
};
821
}

0 commit comments

Comments
 (0)