Skip to content

Commit

Permalink
feat: basic filesystem impl and other deps (#10)
Browse files Browse the repository at this point in the history
* feat: basic filesystem impl and other deps

- implement content addressable basic fs
- import IPLD store impl
- create other subprojects like raft, ucan, did
- add micro_vm provisioning benchmark
- change paths fron UnixPathBuf to Utf8UnixPathBuf

* fix: replace PathDirs in `find*` fns with a better mut crawling impl

- this should be more efficient than PathDirs
- and it solves the forking issue we had with PathDirs earlier
- now our tests pass
- emphasize the immutability nature of the filesystem

* fix: clippy long doc pragaraph complaint

* feat: implement more apis and fix cidlink `resolve_mut` issue

- preventing stale Cids in `CidLink<T>`s by making refactoring structure and fetching supporting async cid resolution. It means we will be able to store and get the latest cid when something changes.

- implement file input/ouput stream

* feat: implement softlink resolution

- cid based softlink has problems and we may likely move to a path based impl in the future; also to maintain compat wih Unix

- add more unit tests and doc tests

* fix: silent softlink brokenlink error issue

- also fix env_pair and rlimit doc tests

* feat: add readme and make nightly clippy happy

* fix: disable nightly checks cause clippy broken again
  • Loading branch information
appcypher authored Oct 20, 2024
1 parent 001f173 commit 83eee43
Show file tree
Hide file tree
Showing 86 changed files with 8,042 additions and 175 deletions.
24 changes: 14 additions & 10 deletions .github/workflows/tests_and_checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ concurrency:
cancel-in-progress: true

jobs:
check-libkrun-changes:
check-libkrun-cache-changes:
runs-on: ubuntu-latest
outputs:
should_build: ${{ steps.check_build.outputs.should_build }}
Expand Down Expand Up @@ -53,13 +53,17 @@ jobs:
elif [ $(git rev-list --count HEAD) -lt 2 ]; then
echo "Only one commit in the repository, building libkrun"
echo "should_build=true" >> $GITHUB_OUTPUT
elif git diff --name-only HEAD^ HEAD | grep -qE 'build_libkrun.sh|.github/workflows/tests_and_checks.yml'; then
echo "build_libkrun.sh or workflow file has changed, building libkrun"
echo "should_build=true" >> $GITHUB_OUTPUT
else
git diff --name-only HEAD^ HEAD | grep -q 'build_libkrun.sh' && echo "should_build=true" >> $GITHUB_OUTPUT || echo "should_build=false" >> $GITHUB_OUTPUT
echo "No relevant changes, no need to build"
echo "should_build=false" >> $GITHUB_OUTPUT
fi
build-libkrun:
needs: check-libkrun-changes
if: needs.check-libkrun-changes.outputs.should_build == 'true' || github.event.inputs.force_build_libkrun == 'true'
needs: check-libkrun-cache-changes
if: needs.check-libkrun-cache-changes.outputs.should_build == 'true' || github.event.inputs.force_build_libkrun == 'true'
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
Expand Down Expand Up @@ -88,18 +92,18 @@ jobs:
path: |
build/libkrunfw/libkrunfw*.so*
build/libkrun/target/release/libkrun*.so*
key: ${{ runner.os }}-libkrun-${{ needs.check-libkrun-changes.outputs.libkrun_hash }}
key: ${{ runner.os }}-libkrun-${{ needs.check-libkrun-cache-changes.outputs.libkrun_hash }}

run-checks:
needs: [check-libkrun-changes, build-libkrun]
needs: [check-libkrun-cache-changes, build-libkrun]
if: always()
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
rust-toolchain:
- stable
- nightly
# - nightly # Nightly Clippy having concussion again!
steps:
- name: Checkout Repository
uses: actions/checkout@v4
Expand All @@ -113,7 +117,7 @@ jobs:
path: |
build/libkrunfw/libkrunfw*.so*
build/libkrun/target/release/libkrun*.so*
key: ${{ runner.os }}-libkrun-${{ needs.check-libkrun-changes.outputs.libkrun_hash }}
key: ${{ runner.os }}-libkrun-${{ needs.check-libkrun-cache-changes.outputs.libkrun_hash }}

- name: Install Rust Toolchain
uses: actions-rs/toolchain@v1
Expand Down Expand Up @@ -166,7 +170,7 @@ jobs:
cargo build --release
run-tests:
needs: [check-libkrun-changes, build-libkrun]
needs: [check-libkrun-cache-changes, build-libkrun]
if: always()
runs-on: ubuntu-latest
strategy:
Expand All @@ -193,7 +197,7 @@ jobs:
path: |
build/libkrunfw/libkrunfw*.so*
build/libkrun/target/release/libkrun*.so*
key: ${{ runner.os }}-libkrun-${{ needs.check-libkrun-changes.outputs.libkrun_hash }}
key: ${{ runner.os }}-libkrun-${{ needs.check-libkrun-cache-changes.outputs.libkrun_hash }}

- name: Print Cache
run: tree -L 2 build/
Expand Down
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Generated by Cargo
# will have compiled files and executables
/target/
**/target/

# These are backup files generated by rustfmt
**/*.rs.bk
Expand Down
Loading

0 comments on commit 83eee43

Please sign in to comment.