Skip to content

Commit

Permalink
Merge branch 'master' into fix/if
Browse files Browse the repository at this point in the history
  • Loading branch information
matteo-cristino authored Nov 26, 2024
2 parents 63b9067 + d2d18fd commit 55174bf
Show file tree
Hide file tree
Showing 20 changed files with 819 additions and 401 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: fsfe/reuse-action@v3
- uses: fsfe/reuse-action@v4


c-lint:
Expand Down
8 changes: 8 additions & 0 deletions .mise.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# SPDX-FileCopyrightText: 2024 Dyne.org foundation
#
# SPDX-License-Identifier: AGPL-3.0-or-later

[tools]
emsdk = "3"
meson = "1"
rust = "stable"
24 changes: 0 additions & 24 deletions .reuse/dep5

This file was deleted.

51 changes: 20 additions & 31 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,11 @@ Zencode has a **no-code** approach. It is a domain-specific language (DSL) **sim

Zencode helps developers to **empower people** who know what to do with data: one can write and review business logic and data-sensitive operations **without learning to code**.


[![software by Dyne.org](https://files.dyne.org/software_by_dyne.png)](http://www.dyne.org)
<p align="center">
<a href="https://dyne.org">
<img src="https://files.dyne.org/software_by_dyne.png" width="170">
</a>
</p>

## Timeline

Expand Down Expand Up @@ -98,38 +101,24 @@ Dependencies: makefile, cmake, gcc, libreadline-dev, xxd

Optional: musl-libc, emscripten for wasm builds

Use this command sequence:

```
git clone https://github.com/dyne/zenroom
cd zenroom
make linux
```

to create the CLI executable in `src/zenroom`

```
make linux-lib
```

to create the shared library in `src/libzenroom-x86_64.so`
There are various build targets, just type make to have a list:

```
make
✨ Welcome to the Zenroom build system
🛟 Usage: make <target>
👇🏽 List of targets:
posix-exe Dynamic executable for generic POSIX
posix-lib Dynamic library for generic POSIX
linux-exe Dynamic executable for GNU/Linux
linux-lib Dynamic library for GNU/Linux
musl Static executable for Musl
win-exe Executable for Windows x86 64bit
win-dll Dynamic lib (DLL) for Windows x86 64bit
osx-exe Executable for Apple MacOS
osx-lib Library for Apple MacOS native
node-wasm WebAssembly (WASM) for Javascript in-browser (Emscripten)
```

to list more available targets

### Meson + Ninja

Practical build scripts for GNU/Linux are provided using Meson + Ninja

```
make meson
```

Will produce a `zenroom` executable and a `libzenroom` shared lib in `zenroom/build`.

## License

Copyright (C) 2017-2023 Dyne.org foundation
Expand Down Expand Up @@ -160,7 +149,7 @@ This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as
published by the Free Software Foundation, either version 3 of the
License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Expand Down
47 changes: 47 additions & 0 deletions REUSE.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# SPDX-FileCopyrightText: 2024 Dyne.org foundation
#
# SPDX-License-Identifier: AGPL-3.0-or-later

version = 1
SPDX-PackageName = "Zenroom"
SPDX-PackageSupplier = "Denis Roio <[email protected]>"
SPDX-PackageDownloadLocation = "https://github.com/dyne/Zenroom"

[[annotations]]
path = [
"src/**",
"bindings/**",
"test/**",
"docs/**",
".github/**",
"build/*",
".gitattributes",
"compile_flags.txt"
]
precedence = "aggregate"
SPDX-FileCopyrightText = "2017-2024 Dyne.org foundation"
SPDX-License-Identifier = "AGPL-3.0-or-later"

[[annotations]]
path = ["lib/lua54/**"]
precedence = "aggregate"
SPDX-FileCopyrightText = "1994-2024 Lua.org, PUC-Rio"
SPDX-License-Identifier = "MIT"

[[annotations]]
path = ["lib/milagro-crypto-c/**"]
precedence = "aggregate"
SPDX-FileCopyrightText = "2019 The Apache Software Foundation"
SPDX-License-Identifier = "Apache-2.0"

[[annotations]]
path = ["lib/pqclean/**"]
precedence = "aggregate"
SPDX-FileCopyrightText = "Léo Ducas, Eike Kiltz, Tancrède Lepoint, Vadim Lyubashevsky, Gregor Seiler, Peter Schwabe, Damien Stehlé"
SPDX-License-Identifier = "CC0-1.0"

[[annotations]]
path = ["lib/ed25519-donna/**"]
precedence = "aggregate"
SPDX-FileCopyrightText = "Andrew M. <[email protected]>"
SPDX-License-Identifier = "CC0-1.0"
5 changes: 5 additions & 0 deletions compile_flags.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
-Ilib/lua54/src
-Ilib/milagro-crypto-c/build/include
-Ilib/milagro-crypto-c/include
-Ilib/ed25519-donna
-Isrc
36 changes: 23 additions & 13 deletions docs/_media/run_utterances.sh
Original file line number Diff line number Diff line change
@@ -1,27 +1,37 @@
#!/usr/bin/env bash
# this file create the zencode_utterances_reworked.yaml file
# that in turn is used by zencode-list.md to document all the
# zenroom statements

rm -f zencode_utterances_reworked.yaml

for i in `ls ../../src/lua/zencode_*`; do
SCENARIO=`echo $i | cut -d _ -f 2 | cut -d . -f 1`
../../src/zenroom -D $SCENARIO 2>/dev/null | jq . > temp.json;
SCENARIO=`echo $i | cut -d _ -f2- | cut -d . -f1`
../../zenroom -D $SCENARIO 2>/dev/null | jq . > temp.json;
echo "### [${SCENARIO}]" >> zencode_utterances_reworked.yaml
if [ $SCENARIO == "debug" ]; then
cat temp.json \
| jq '."Given" | keys[] ' \
| sed -e 's/\\\"/\"/g' -e 's/^.//g' -e 's/.$//g' \
| sort \
>> zencode_utterances_reworked.yaml
if [ "$SCENARIO" == "debug" ]; then
cat temp.json \
| jq '."Given" | keys[] ' \
| sed -e 's/\\\"/\"/g' -e 's/^.//g' -e 's/.$//g' \
| sort \
>> zencode_utterances_reworked.yaml
else
cat temp.json \
| jq '.["Given", "If", "When", "Then"] | keys[] ' \
| sed -e 's/\\\"/\"/g' -e 's/^.//g' -e 's/.$//g' \
| sort \
>> zencode_utterances_reworked.yaml
cat temp.json \
| jq '.If | keys[] ' \
| sed -e 's/\\\"/\"/g' -e 's/^.//g' -e 's/.$//g' \
>> temp_if.txt
cat temp.json \
| jq '.["Given", "If", "Foreach", "When", "Then"] | keys[] ' \
| sed -e 's/\\\"/\"/g' -e 's/^.//g' -e 's/.$//g' \
| sort \
>> zencode_utterances_reworked.yaml
fi
echo "### [${SCENARIO}]" >> zencode_utterances_reworked.yaml
done

echo "### [if_subset]" >> zencode_utterances_reworked.yaml
cat temp_if.txt | sort >> zencode_utterances_reworked.yaml
echo "### [if_subset]" >> zencode_utterances_reworked.yaml

rm temp.json
rm temp_if.txt
Loading

0 comments on commit 55174bf

Please sign in to comment.