Skip to content

Commit

Permalink
Merge pull request #4 from farm-fe/chore/update-example
Browse files Browse the repository at this point in the history
chore: update example
  • Loading branch information
wre232114 authored Nov 15, 2024
2 parents 9d060c5 + c3f9f29 commit 4ae9b17
Show file tree
Hide file tree
Showing 35 changed files with 4,303 additions and 2,361 deletions.
36 changes: 36 additions & 0 deletions .cargo/config.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@

[net]
git-fetch-with-cli = true

[build]

rustdocflags = ["--cfg", "docsrs"]
rustflags = ["-Zshare-generics=y"]

[target.x86_64-unknown-linux-gnu]
rustflags = ["-C", "target-feature=+sse2", "-Zshare-generics=y"]

[target.aarch64-unknown-linux-gnu]
linker = "aarch64-linux-gnu-gcc"

[target.aarch64-unknown-linux-musl]
linker = "aarch64-linux-musl-gcc"
rustflags = [
"-C",
"target-feature=-crt-static",
"-C",
"link-arg=-lgcc",
"-Zshare-generics=y",
]

[target.x86_64-pc-windows-msvc]
linker = "rust-lld"
rustflags = ["-C", "target-feature=+crt-static", "-Zshare-generics=y"]


[target.aarch64-pc-windows-msvc]
linker = "rust-lld"

[target.armv7-unknown-linux-gnueabi]
linker = "arm-linux-gnueabihf-gcc"
rustflags = ["-C", "target-feature=-crt-static"]
15 changes: 6 additions & 9 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,15 +39,15 @@ jobs:
target: i686-pc-windows-msvc
build: |
export CARGO_PROFILE_RELEASE_LTO=false
cargo install cargo-xwin
cargo install --locked cargo-xwin
npm run build -- --target i686-pc-windows-msvc --abi win32-ia32-msvc --cargo-flags="--no-default-features"
- os: windows-latest
abi: win32-arm64-msvc
target: aarch64-pc-windows-msvc
build: |
export CARGO_PROFILE_RELEASE_CODEGEN_UNITS=256
export CARGO_PROFILE_RELEASE_LTO=false
cargo install cargo-xwin
cargo install --locked cargo-xwin
npm run build -- --target aarch64-pc-windows-msvc --abi win32-arm64-msvc --cargo-flags="--no-default-features"
# linux
- os: ubuntu-latest
Expand All @@ -58,11 +58,6 @@ jobs:
abi: linux-arm64-gnu
target: aarch64-unknown-linux-gnu
zig: true
# macos
# - os: macos-latest
# abi: darwin-arm64
# target: aarch64-apple-darwin
# zig: false
# - os: ubuntu-latest
# abi: darwin-x64
# target: x86_64-apple-darwin
Expand All @@ -83,17 +78,19 @@ jobs:
with:
node-version: 18
- name: Install Dependencies
run: npm install -g pnpm@8.15.1 && pnpm i --frozen-lockfile
run: npm install -g pnpm@9.1.0 && pnpm i --frozen-lockfile
- run: rustup target add ${{ matrix.settings.target }}
if: ${{ matrix.settings.target }}
# Use the v1 of this action
- uses: mbround18/setup-osxcross@v1
if: ${{ matrix.settings.osxcross }}
# This builds executables & sets env variables for rust to consume.
with:
osx-version: '12.3'
osx-version: "12.3"
- uses: goto-bus-stop/setup-zig@v2
if: ${{ matrix.settings.zig }}
with:
version: 0.14.0-dev.1983+6bf52b050
- name: Build in docker
uses: addnab/docker-run-action@v3
if: ${{ matrix.settings.docker }}
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Cross Build On Linux
name: Test Plugin
on:
pull_request:
branches:
Expand Down Expand Up @@ -31,6 +31,6 @@ jobs:
with:
node-version: 18.x
- name: Install Dependencies
run: npm install -g pnpm@8.15.1
run: npm install -g pnpm@9.1.0
- name: Test Example
run: cd example && pnpm i && pnpm build
run: cd playground && pnpm i && pnpm build
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
done
- name: Install Dependencies
run: npm install -g pnpm@8.15.1 && pnpm i --frozen-lockfile
run: npm install -g pnpm@9.1.0 && pnpm i --frozen-lockfile

- name: Publish to npm
run: npm set //registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }} && npm publish
201 changes: 192 additions & 9 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,14 +1,197 @@
# Generated by Cargo
# will have compiled files and executables
debug/
target/
# Created by https://www.toptal.com/developers/gitignore/api/node
# Edit at https://www.toptal.com/developers/gitignore?templates=node

# These are backup files generated by rustfmt
**/*.rs.bk
### Node ###
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
lerna-debug.log*

# MSVC Windows builds of rustc generate these, which store debugging information
*.pdb
# Diagnostic reports (https://nodejs.org/api/report.html)
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json

# Runtime data
pids
*.pid
*.seed
*.pid.lock

# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov

# Coverage directory used by tools like istanbul
coverage
*.lcov

# nyc test coverage
.nyc_output

# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
.grunt

# Bower dependency directory (https://bower.io/)
bower_components

# node-waf configuration
.lock-wscript

# Compiled binary addons (https://nodejs.org/api/addons.html)
build/Release

# Dependency directories
node_modules/
*.node
jspm_packages/

# TypeScript v1 declaration files
typings/

# TypeScript cache
*.tsbuildinfo

# Optional npm cache directory
.npm

# Optional eslint cache
.eslintcache

# Microbundle cache
.rpt2_cache/
.rts2_cache_cjs/
.rts2_cache_es/
.rts2_cache_umd/

# Optional REPL history
.node_repl_history

# Output of 'npm pack'
*.tgz

# Yarn Integrity file
.yarn-integrity

# dotenv environment variables file
.env
.env.test

# parcel-bundler cache (https://parceljs.org/)
.cache

# Next.js build output
.next

# Nuxt.js build / generate output
.nuxt
dist

# Gatsby files
.cache/
# Comment in the public line in if your project uses Gatsby and not Next.js
# https://nextjs.org/blog/next-9-1#public-directory-support
# public

# vuepress build output
.vuepress/dist

# Serverless directories
.serverless/

# FuseBox cache
.fusebox/

# DynamoDB Local files
.dynamodb/

# TernJS port file
.tern-port

# Stores VSCode versions used for testing VSCode extensions
.vscode-test

# End of https://www.toptal.com/developers/gitignore/api/node

# Created by https://www.toptal.com/developers/gitignore/api/macos
# Edit at https://www.toptal.com/developers/gitignore?templates=macos

### macOS ###
# General
.DS_Store
.AppleDouble
.LSOverride

# Icon must end with two
Icon


# Thumbnails
._*

# Files that might appear in the root of a volume
.DocumentRevisions-V100
.fseventsd
.Spotlight-V100
.TemporaryItems
.Trashes
.VolumeIcon.icns
.com.apple.timemachine.donotpresent

# Directories potentially created on remote AFP share
.AppleDB
.AppleDesktop
Network Trash Folder
Temporary Items
.apdisk

### macOS Patch ###
# iCloud generated files
*.icloud

# End of https://www.toptal.com/developers/gitignore/api/macos

# Created by https://www.toptal.com/developers/gitignore/api/windows
# Edit at https://www.toptal.com/developers/gitignore?templates=windows

### Windows ###
# Windows thumbnail cache files
Thumbs.db
Thumbs.db:encryptable
ehthumbs.db
ehthumbs_vista.db

# Dump file
*.stackdump

# Folder config file
[Dd]esktop.ini

# Recycle Bin used on file shares
$RECYCLE.BIN/

# Windows Installer files
*.cab
*.msi
*.msix
*.msm
*.msp

# Windows shortcuts
*.lnk

# End of https://www.toptal.com/developers/gitignore/api/windows

#Added by cargo

/target
# Cargo.lock

.pnp.*
.yarn/*
!.yarn/patches
!.yarn/plugins
!.yarn/releases
!.yarn/sdks
!.yarn/versions

*.farm
Loading

0 comments on commit 4ae9b17

Please sign in to comment.