Skip to content
Open
Show file tree
Hide file tree
Changes from 14 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
76 changes: 42 additions & 34 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,33 +1,41 @@
name: CI

on: [push, pull_request]
on:
push:

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why we don't trigger CI for other branch?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

gh-page? ci auto dispathch ci.
is updated now:
branches-ignore:
- 'gh-pages'

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i ignored if: ${{ github.ref == env.default-branch }} before commit and i have deleted on: push: now

branches: [ main, master ]
pull_request:
branches: [ main, master ]

workflow_dispatch: {}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any need to add workflow_dispatch option?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

manually triggering online debugging is a very convenient feature

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here is only for debug. But in the real condition maybe we doesn't need it?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

deleted currently


jobs:
ci:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
rust-toolchain: [nightly]
targets: [x86_64-unknown-linux-gnu, x86_64-unknown-none, riscv64gc-unknown-none-elf, aarch64-unknown-none-softfloat]
targets: [ x86_64-unknown-linux-gnu, x86_64-unknown-none, riscv64gc-unknown-none-elf, aarch64-unknown-none-softfloat ]

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove the extra spaces.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

removed

steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@nightly
with:
toolchain: ${{ matrix.rust-toolchain }}
components: rust-src, clippy, rustfmt
targets: ${{ matrix.targets }}
- name: Check rust version
run: rustc --version --verbose
- name: Check code format
run: cargo fmt --all -- --check
- name: Clippy
run: cargo clippy --target ${{ matrix.targets }} --all-features -- -A clippy::new_without_default
- name: Build
run: cargo build --target ${{ matrix.targets }} --all-features
- name: Unit test
if: ${{ matrix.targets == 'x86_64-unknown-linux-gnu' }}
run: cargo test --target ${{ matrix.targets }} -- --nocapture
- uses: actions/checkout@v4
- name: Install Rust toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: nightly
profile: minimal
components: rust-src, rustfmt, clippy
targets: ${{ matrix.targets }}
override: true
- name: Check rust version
run: rustc --version --verbose
- name: Check code format
run: cargo fmt --all -- --check
- name: Clippy
run: cargo clippy -Z build-std=core,alloc --target ${{ matrix.targets }} --all-features -- -A clippy::new_without_default
- name: Build
run: cargo build -Z build-std=core,alloc --target ${{ matrix.targets }} --all-features
- name: Unit test
if: ${{ matrix.targets == 'x86_64-unknown-linux-gnu' }}
run: cargo test --target ${{ matrix.targets }} -- --nocapture

doc:
runs-on: ubuntu-latest
Expand All @@ -39,17 +47,17 @@ jobs:
default-branch: ${{ format('refs/heads/{0}', github.event.repository.default_branch) }}
RUSTDOCFLAGS: -D rustdoc::broken_intra_doc_links -D missing-docs
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@nightly
- name: Build docs
continue-on-error: ${{ github.ref != env.default-branch && github.event_name != 'pull_request' }}
run: |
cargo doc --no-deps --all-features
printf '<meta http-equiv="refresh" content="0;url=%s/index.html">' $(cargo tree | head -1 | cut -d' ' -f1) > target/doc/index.html
- name: Deploy to Github Pages
if: ${{ github.ref == env.default-branch }}
uses: JamesIves/github-pages-deploy-action@v4
with:
single-commit: true
branch: gh-pages
folder: target/doc
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@nightly
- name: Build docs
continue-on-error: ${{ github.ref != env.default-branch && github.event_name != 'pull_request' }}
run: |
cargo doc --no-deps --all-features
printf '<meta http-equiv="refresh" content="0;url=%s/index.html">' $(cargo tree | head -1 | cut -d' ' -f1) > target/doc/index.html
- name: Deploy to Github Pages
if: ${{ github.ref == env.default-branch }}
uses: JamesIves/github-pages-deploy-action@v4
with:
single-commit: true
branch: gh-pages
folder: target/doc
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
/target
/.vscode
.vscode
.DS_Store
Cargo.lock
.idea
*.json
*.xml
12 changes: 8 additions & 4 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
[package]
name = "axio"
version = "0.1.1"
edition = "2021"
authors = ["Yuekai Jia <equation618@gmail.com>"]
version = "0.1.2"
edition = "2024"

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

keep it as 2021 to make it compatible with more toolchain versions?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the task of os camp is to make it run on the latest toolchain

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The bootcamp missions are not entirely correct. We prioritize the usability of the modules.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed now

rust-version = "1.87.0"
authors = [
"Yuekai Jia <equation618@gmail.com>",
"Leo Cheng <chengkelfan@qq.com>",
]
description = "`std::io`-like I/O traits for `no_std` environment"
license = "GPL-3.0-or-later OR Apache-2.0 OR MulanPSL-2.0"
homepage = "https://github.com/arceos-org/arceos"
Expand All @@ -16,4 +20,4 @@ alloc = []
default = []

[dependencies]
axerrno = "0.1"
axerrno = { version = "0.1.0" }

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why we can't set axerrno = "0.1"?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is updated now

47 changes: 45 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,52 @@
# axio
<h1 align="center" style="margin-bottom: 0;">axio</h1>

<div align="left" style="margin-bottom: 1.5em">

> [`std::io`][1]-like I/O traits for `no_std` environment.

</div>



---

<div align="center" style="
display: flex;
flex-wrap: wrap;
justify-content: center;
gap: 0.2em;
margin: 0.2em 0;
">

[![Crates.io](https://img.shields.io/crates/v/axio)](https://crates.io/crates/axio)
[![Docs.rs](https://docs.rs/axio/badge.svg)](https://docs.rs/axio)
[![CI](https://github.com/arceos-org/axio/actions/workflows/ci.yml/badge.svg?branch=main)](https://github.com/arceos-org/axio/actions/workflows/ci.yml)
[![DeepWiki](https://img.shields.io/badge/DeepWiki-docs-8A2BE2)](https://deepwiki.org/arceos-org/axio)
[![Dependencies](https://img.shields.io/librariesio/release/cargo/axio)](https://libraries.io/cargo/axio)
[![Downloads](https://img.shields.io/crates/d/axio)](https://crates.io/crates/axio)
[![Code Size](https://img.shields.io/github/languages/code-size/arceos-org/axio)](https://github.com/arceos-org/axio)

[`std::io`][1]-like I/O traits for `no_std` environment.
[![Activity](https://img.shields.io/github/commit-activity/m/arceos-org/axio)](https://github.com/arceos-org/axio/pulse)
[![Toolchain](https://img.shields.io/badge/toolchain-nightly--2025--06--18-orange)](https://rust-lang.github.io/rustup/concepts/channels.html)
[![License](https://img.shields.io/crates/l/axio)](https://github.com/arceos-org/axio/blob/main/LICENSE)

</div>

---

[1]: https://doc.rust-lang.org/std/io/index.html



## Example

```rust
fn main() {
use axio::{Read, BufReader};

let data = b"hello world";
let mut reader = BufReader::new(&data[..]);
let mut buf = [0u8; 5];
reader.read_exact(&mut buf).unwrap();
}
```
2 changes: 2 additions & 0 deletions rust-toolchain
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[toolchain]
channel = "nightly-2025-06-18"
Loading
Loading