Skip to content

Commit

Permalink
Start the docs for persist
Browse files Browse the repository at this point in the history
  • Loading branch information
alex-sparus committed Jul 11, 2024
1 parent bebb851 commit 9c36ad5
Show file tree
Hide file tree
Showing 6 changed files with 71 additions and 0 deletions.
1 change: 1 addition & 0 deletions doc/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ Contents

python
guile
persist

----

Expand Down
1 change: 1 addition & 0 deletions doc/persist.rst
18 changes: 18 additions & 0 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

34 changes: 34 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,16 @@
url = "github:arximboldi/cereal";
flake = false;
};
docs-nixpkgs = {
url = "github:NixOS/nixpkgs/d0d905668c010b65795b57afdf7f0360aac6245b";
flake = false;
};
};

outputs = {
self,
nixpkgs,
docs-nixpkgs,
flake-utils,
flake-compat,
pre-commit-hooks,
Expand Down Expand Up @@ -114,6 +119,35 @@
'';
};

devShells.docs = let
docsPkgs = import docs-nixpkgs {inherit system;};
docs = docsPkgs.callPackage ./nix/docs.nix {};
in
pkgs.mkShell {
packages = [
pkgs.just
pkgs.fzf
pkgs.starship
pkgs.cmake
pkgs.ninja

docsPkgs.doxygen
(docsPkgs.python.withPackages (ps: [
ps.sphinx
docs.breathe
docs.recommonmark
]))
];

shellHook =
self.checks.${system}.pre-commit-check.shellHook
+ "\n"
+ ''
alias j=just
eval "$(starship init bash)"
'';
};

packages = {
immer = let
inherit (gitignore.lib) gitignoreSource;
Expand Down
5 changes: 5 additions & 0 deletions immer/extra/persist/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@

Persist
===============

This library allows to preserve structural sharing of immer containers while serializing and deserializing them.
12 changes: 12 additions & 0 deletions justfile
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,15 @@ mk-build-asan: (_mk-dir build-asan-path)

run-tests-asan:
cd {{ build-asan-path }} ; ninja tests && ninja test

build-docs-path := "build-docs-" + os() + "-" + arch()

[linux]
mk-build-docs: (_mk-dir build-docs-path)
rm -rf doc/_build
rm -rf doc/_doxygen
cmake -B {{ build-docs-path }} -G Ninja -Dimmer_BUILD_TESTS=off

[linux]
build-docs:
cmake --build {{ build-docs-path }} --target docs

0 comments on commit 9c36ad5

Please sign in to comment.