Skip to content

Commit

Permalink
v0.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
yayanyang committed Feb 29, 2024
1 parent e6acb6f commit c505b66
Show file tree
Hide file tree
Showing 7 changed files with 96 additions and 8 deletions.
28 changes: 28 additions & 0 deletions .github/workflows/ci.yaml
@@ -0,0 +1,28 @@
on:
push:
branches:
- main

name: CI

jobs:
cargo_test:
strategy:
matrix:
os:
- ubuntu-latest
- macos-latest
- windows-latest
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
- name: install nasm
uses: ilammy/setup-nasm@v1
if: startsWith(matrix.os, 'windows')
- uses: actions-rs/cargo@v1
with:
command: test
args:
38 changes: 38 additions & 0 deletions .github/workflows/release.yaml
@@ -0,0 +1,38 @@
name: Release

permissions:
contents: write

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

jobs:
create-release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: taiki-e/create-gh-release-action@v1
with:
# (optional) Path to changelog.
# changelog: CHANGELOG.md
# (required) GitHub token for creating GitHub Releases.
token: ${{ secrets.GITHUB_TOKEN }}

publish:
runs-on: ubuntu-latest

name: "publish"

environment: cargo

steps:
- uses: actions/checkout@v3
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
- uses: katyo/publish-crates@v2
with:
registry-token: ${{ secrets.CARGO_REGISTRY_TOKEN }}
2 changes: 2 additions & 0 deletions Cargo.toml
Expand Up @@ -11,3 +11,5 @@ version = "0.1.0"
log = { version = "^0.4" }
pretty_env_logger = "^0.5"
futures = { version = "^0.3" }

rasi-syscall = { path = "./crates/syscall", version = "^0.1" }
12 changes: 12 additions & 0 deletions crates/rasi/Cargo.toml
@@ -0,0 +1,12 @@
[package]
description = "An implementation of Rust Asynchronous System Interface(RASI)"
documentation = "https://docs.rs/rasi"
edition.workspace = true
license = "MIT"
name = "rasi"
repository.workspace = true
version.workspace = true

[dependencies]
futures = { workspace = true }
rasi-syscall = { workspace = true }
1 change: 1 addition & 0 deletions crates/rasi/src/lib.rs
@@ -0,0 +1 @@

19 changes: 13 additions & 6 deletions crates/syscall/src/lib.rs
@@ -1,6 +1,13 @@
pub mod cancellable;
pub mod executor;
pub mod fs;
pub mod handle;
pub mod net;
pub mod time;
mod cancellable;
mod executor;
mod fs;
mod handle;
mod net;
mod time;

pub use cancellable::*;
pub use executor::*;
pub use fs::*;

Check warning on line 10 in crates/syscall/src/lib.rs

View workflow job for this annotation

GitHub Actions / cargo_test (ubuntu-latest)

unused import: `fs::*`

Check warning on line 10 in crates/syscall/src/lib.rs

View workflow job for this annotation

GitHub Actions / cargo_test (macos-latest)

unused import: `fs::*`

Check warning on line 10 in crates/syscall/src/lib.rs

View workflow job for this annotation

GitHub Actions / cargo_test (windows-latest)

unused import: `fs::*`
pub use handle::*;
pub use net::*;
pub use time::*;
4 changes: 2 additions & 2 deletions crates/syscall/src/time.rs
Expand Up @@ -8,8 +8,8 @@ use std::{

use crate::handle::Handle;

/// timeout-related system call interface
pub trait Timeout {
/// Timer-related system call interface
pub trait Timer {
/// Create new `deadline` timer, returns [`None`] if the `deadline` instant is reached.
fn deadline(&self, deadline: Instant) -> io::Result<Option<Handle>>;

Expand Down

0 comments on commit c505b66

Please sign in to comment.