Skip to content
This repository has been archived by the owner on Sep 15, 2024. It is now read-only.

Commit

Permalink
First Commit
Browse files Browse the repository at this point in the history
  • Loading branch information
ppenna committed Aug 9, 2024
0 parents commit 6cb47f4
Show file tree
Hide file tree
Showing 11 changed files with 431 additions and 0 deletions.
63 changes: 63 additions & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
# Copyright(c) The Maintainers of Nanvix.
# Licensed under the MIT License.

name: Build

on: push

env:
TARGET_BRANCH: ${{ github.ref_name }}

jobs:

setup:
name: Setup
runs-on: ubuntu-latest
steps:
- name: Setup
uses: appleboy/ssh-action@master
with:
host: ${{ secrets.hostname }}
username: ${{ secrets.username }}
key: ${{ secrets.sshkey }}
port: ${{ secrets.portnum }}
envs: TARGET_BRANCH
script: |
rm -rf allocator
git clone --recursive https://github.com/nanvix/allocator.git --branch ${TARGET_BRANCH}
build:
name: Build
needs: setup
runs-on: ubuntu-latest
steps:
- name: Build
uses: appleboy/ssh-action@master
with:
host: ${{ secrets.hostname }}
username: ${{ secrets.username }}
key: ${{ secrets.sshkey }}
port: ${{ secrets.portnum }}
script: |
source "$HOME/.cargo/env"
cd allocator
cargo build --verbose
cleanup:
name: Cleanup
needs: build
if: always()
runs-on: ubuntu-latest
steps:
- name: Cleanup
uses: appleboy/ssh-action@master
with:
host: ${{ secrets.hostname }}
username: ${{ secrets.username }}
key: ${{ secrets.sshkey }}
port: ${{ secrets.portnum }}
script: |
cd allocator
git checkout --force dev
git clean -fdx
git remote prune origin
17 changes: 17 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Copyright(c) The Maintainers of Nanvix.
# Licensed under the MIT License.

# Build artifacts
bin/
lib/
target/
*.a
*.o
*.elf
*.iso
Cargo.lock

# IDEs
*.swo
*.swp
*.vscode/
4 changes: 4 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[submodule "build"]
path = build
url = https://github.com/nanvix/build
branch = dev
18 changes: 18 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Copyright(c) The Maintainers of Nanvix.
# Licensed under the MIT License.

[package]
name = "allocator"
version = "0.0.1"
license-file = "LICENSE.txt"
edition = "2021"
authors = ["The Maintainers of Nanvix"]
description = "Memory Allocator for no_std Systems"
homepage = "https://github.com/nanvix"

[lib]
crate-type = ["lib"]

[dependencies]
error = { git = "https://github.com/nanvix/error", branch = "releases/v0.0.1" }
slab = { git = "https://github.com/nanvix/slab", branch = "releases/v0.0.1" }
21 changes: 21 additions & 0 deletions LICENSE.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright(c) Maintainers of Nanvix

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
23 changes: 23 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Allocator

[![Join us on Slack!](https://img.shields.io/badge/chat-on%20Slack-e01563.svg)](https://join.slack.com/t/nanvix/shared_invite/zt-1yu30bs28-nsNmw8IwCyh6MBBV~B~X7w)

A memory allocator for `no_std` systems.

This allocator is used in the Nanvix operating system for user-space memory allocations.

> Learn more about Nanvix at [https://github.com/nanvix](https://github.com/nanvix).
## Join the Community

We use [Slack](https://join.slack.com/t/nanvix/shared_invite/zt-1yu30bs28-nsNmw8IwCyh6MBBV~B~X7w) as our main communication channel. Join us there!

## Usage Statement

This project is a prototype. As such, we provide no guarantees that it will work and you are assuming any risks with using the code. We welcome comments and feedback. Please send any questions or comments to any [maintainer of the project](https://github.com/orgs/nanvix/people).

> By sending feedback, you are consenting that it may be used in the further development of this project.
## License

This project is distributed under the [MIT License](LICENSE.txt).
1 change: 1 addition & 0 deletions build
Submodule build added at 9766b1
1 change: 1 addition & 0 deletions clippy.toml
1 change: 1 addition & 0 deletions rust-toolchain
1 change: 1 addition & 0 deletions rustfmt.toml
Loading

0 comments on commit 6cb47f4

Please sign in to comment.