Skip to content

Commit

Permalink
migrate sugarloaf from raphamorim/rio
Browse files Browse the repository at this point in the history
  • Loading branch information
raphamorim committed Nov 23, 2024
0 parents commit b2f85a0
Show file tree
Hide file tree
Showing 204 changed files with 52,997 additions and 0 deletions.
13 changes: 13 additions & 0 deletions .cargo/config.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
[target.wasm32-unknown-unknown]
rustflags = [
# Enabled unstable APIs from web_sys
"--cfg=web_sys_unstable_apis",
]
runner = 'wasm-bindgen-test-runner'

[target.aarch64-apple-darwin]
rustflags = [
# We can guarantee that this target will always run on a CPU with _at least_
# these capabilities, so let's optimize for them
"-Ctarget-cpu=apple-m1"
]
34 changes: 34 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# EditorConfig helps developers define and maintain consistent
# coding styles between different editors and IDEs
# editorconfig.org

root = true

[*]
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
indent_style = space
indent_size = 4

[*.js]
charset = utf-8
end_of_line = lf
indent_size = 2
indent_style = space
insert_final_newline = true
max_line_length = 80
trim_trailing_whitespace = true

[*.md]
# double whitespace at end of line
# denotes a line break in Markdown
trim_trailing_whitespace = false

[*.yml]
indent_size = 2

[{Makefile,**.mk}]
# Use tabs for indentation (Makefiles require tabs)
indent_style = tab
54 changes: 54 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: Test

on: [push, pull_request]

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true

env:
CARGO_TERM_COLOR: always
RUST_BACKTRACE: full

jobs:
test-native:
strategy:
matrix:
os: [windows-latest, macos-latest, ubuntu-latest]

runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- uses: Swatinem/rust-cache@v2
- run: rustup toolchain install stable --profile minimal
- run: rustup component add rustfmt clippy
- run: cargo fetch
- run: cargo fmt -- --check --color always
- run: cargo clippy --all-targets --all-features
- run: cargo test --release
msys2-build-test: #cargo test doesn't necessarily build the exec we want
strategy:
matrix:
sys: [MINGW64, UCRT64, CLANG64]
runs-on: windows-latest
steps:
- uses: actions/checkout@v4

- name: Setup MSYS2
uses: msys2/setup-msys2@v2
with:
msystem: ${{ matrix.sys }}
update: true
install: base-devel git
pacboy: >-
rust:p
cc:p
pkgconf:p
cmake:p
freetype:p
python:p
fontconfig:p
- name: Run cargo
shell: msys2 {0}
run: cargo build --release
21 changes: 21 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# These are backup files generated by rustfmt
**/*.rs.bk

# required by nix
.direnv/
result/

target/
.DS_Store
rls/
.vs
.vscode
.swp
release
.jekyll-cache
.jekyll-metadata
NOTES
*.log

# for nix users
.direnv/
Loading

0 comments on commit b2f85a0

Please sign in to comment.