Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Migrate crypto library from ConcordiumSwiftSdk
Due to the way SwiftPM works, compiled binaries needs to be published in a separate repo from the package itself. Otherwise, the huge static binaries would have to be checked into git, and nobody wants that. With this setup the Rust sources will live as part of the actual published package (defined by `Package.swift` and generated bridge code) along with the compiled binaries which are published as releases of this repo. It's admittedly quite confusing that "releases" of the repo only contain the binaries (identified by "internal" tags) while the actual release is the repo itself (identified by "external" tags). This commit adds the Rust sources but doesn't migrate `Package.swift` yet. The build process consists of the following two steps: 1. Tag the commit with the Rust sources that we want to build from and run the workflow to publish the XCFramework as a GitHub release. 2. Generate/update the Swift bridge sources and the packages spec. Commit and tag again. The build has to span two tags because GitHub releases must refer to a tag. The first tag becomes part of the URL of the release and needs to be referenced in `Package.swift` along with the checksum of the zip file. The tag created in step 2 is the one that defines the "actual" release, meaning that it's what's consuming packages use. For a given release version `<version>` the "internal" tag uses format `build/<version>-<build-version>` while the "external" one is just `<version>`. Note that the internal tag includes another component `<build-version>` which is bumped for every build attempt (starting from `0` for any `<version>`).
- Loading branch information