Skip to content

Commit

Permalink
small fix in workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
vemonet committed Mar 31, 2024
1 parent 2a380c8 commit ae7ad31
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 7 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:
include:
- os: linux
target: x86_64-unknown-linux-gnu
- os: ubuntu-latest
- os: linux
target: aarch64-unknown-linux-gnu
- os: macos
target: x86_64-apple-darwin
Expand Down Expand Up @@ -200,7 +200,7 @@ jobs:


npm_tarball:
name: 🦊 Build npm package
name: 🦊 Wasm and npm package
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Expand Down
6 changes: 3 additions & 3 deletions lib/docs/docs/contributing.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,18 +39,18 @@ nanopub-rs/

### ✒️ Nanopub signing process

- Preliminary nanopub is created with blank space in URIs at the places where the trusty URI code will appear (normalized URI: `https://w3id.org/np/ `, cf. [code](https://github.com/Nanopublication/nanopub-java/blob/22bba0e79508309f1c6163970f49ab596beadeb0/src/main/java/org/nanopub/trusty/TempUriReplacer.java#L12)); this includes the signature part, except the triple that is stating the actual signature
- Preliminary nanopub is created with blank space in URIs at the places where the trusty URI code will appear (normalized URI: `https://w3id.org/np/ `, cf. [original java implementation](https://github.com/Nanopublication/nanopub-java/blob/22bba0e79508309f1c6163970f49ab596beadeb0/src/main/java/org/nanopub/trusty/TempUriReplacer.java#L12)); this includes the signature part, except the triple that is stating the actual signature
- Preliminary nanopub is serialized in a normalized fashion (basically each quad on four lines with minimal escaping)
- Signature is calculated on this normalized representation (cf. most of the process in the [trusty-uri python lib](https://github.dev/trustyuri/trustyuri-python/blob/9f29732c4abae9d630d36e6da24720e02f543ebf/trustyuri/rdf/RdfHasher.py#L15), see also [SignatureUtils](https://github.com/Nanopublication/nanopub-java/blob/22bba0e79508309f1c6163970f49ab596beadeb0/src/main/java/org/nanopub/extra/security/SignatureUtils.java#L196) and [trusty-uri](https://github.com/trustyuri/trustyuri-java/blob/08b61fbb13d20a5cbefde617bd9a9e9b0b03d780/src/main/java/net/trustyuri/rdf/RdfHasher.java#L86))
- Signature triple is added
- Trusty URI code is calculated on normalized representation that includes signature
- Trusty URI code is added in place of all the occurrences of blank spaces in the URIs, leading to the final trusty nanopub

### Notes about maintenance and stability
### 🛠️ Notes about maintenance and stability

Cross-compiling to many targets brings some complexity to the build process, especially that the nanopub lib packs a lot of features: processing RDF, RSA signing and key generation, querying a HTTP server, getting current datetime access.

This means we need to make sure the dependencies we use works for all targets.
This means we need to make sure the dependencies we use work for all compilation targets (e.g. aarch64, wasm).

### ☑️ To do

Expand Down
3 changes: 1 addition & 2 deletions scripts/test-js.sh
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
#!/usr/bin/env bash
set -e

cd js

# Check for --no-build flag
SKIP_BUILD=false
for arg in "$@"; do
Expand All @@ -12,6 +10,7 @@ for arg in "$@"; do
fi
done

cd js
npm install

if [ "$SKIP_BUILD" = false ]; then
Expand Down

0 comments on commit ae7ad31

Please sign in to comment.