Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update package info, add readme and auto release action #3

Merged
merged 4 commits into from
Oct 18, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 26 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Release

on:
push:
tags:
- v[0-9]+.[0-9]+.[0-9]+

env:
CARGO_TERM_COLOR: always

jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Publish
run: |
sudo apt-get update && sudo apt-get install --yes sed
VERSION=$(sed --regexp-extended --silent 's/^version = \"(.*)"$/\1/p' Cargo.toml)
[ "$GITHUB_REF_NAME" == "v$VERSION" ]
cargo publish --token ${{ secrets.CRATES_IO_TOKEN }}
- name: Release
uses: softprops/action-gh-release@v1
with:
generate_release_notes: true
12 changes: 9 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,10 +1,16 @@
[package]
name = "snapshot"
version = "0.1.0"
authors = ["Amazon Firecracker team <[email protected]>"]
name = "dbs-snapshot"
version = "1.5.0"
authors = [
"Amazon Firecracker team <[email protected]>",
"Kata Containers Developers",
]
edition = "2021"
autobenches = false
license = "Apache-2.0"
readme = "README.md"
repository = "https://github.com/kata-containers/dbs-snapshot"
homepage = "https://github.com/kata-containers/dbs-snapshot"

[lib]
bench = false
Expand Down
11 changes: 11 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# dbs-snapshot

`dbs-snapshot` is a fork of [Firecracker microvmm's](https://github.com/firecracker-microvm/firecracker) `snapshot` crate. It was done so because the Firecracker maintainers [have no plan to publish the crate on crates.io](https://github.com/firecracker-microvm/firecracker/issues/4162).

`dbs-snapshot` provides a version tolerant serialization and deserialization facilities and implements a persistent storage format for saving rust struct states. It can form a basis of many useful functionalities such as VM snapshot for rust-based VMMs, as well as user space program live upgrade for other projects like [Nydus](https://github.com/dragonflyoss/image-service/).

# Disclaimer

Please note that the crate is released from v1.5.0 because that is the initial Firecracker release version the crate was taken from.

We will use sematic versioning. The API backward-compatibilites will always be reserved across patch version updates. The backward-compatibilities across minor version updates will be preserved in a best effort manner. Whenever API backward-compatibility is broken on purpose, we will bump the major version.
2 changes: 1 addition & 1 deletion benches/version_map.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0
use criterion::{black_box, criterion_group, criterion_main, Criterion};
use snapshot::Snapshot;
use dbs_snapshot::Snapshot;
use versionize::{VersionMap, Versionize, VersionizeResult};
use versionize_derive::Versionize;

Expand Down
2 changes: 1 addition & 1 deletion tests/test.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0
use snapshot::{Error, Snapshot};
use dbs_snapshot::{Error, Snapshot};
use versionize::{VersionMap, Versionize, VersionizeError, VersionizeResult};
use versionize_derive::Versionize;

Expand Down
Loading