Crates.io | steel-plate |
lib.rs | steel-plate |
version | 0.1.0 |
source | src |
created_at | 2022-08-02 03:52:00.44616 |
updated_at | 2022-08-02 03:52:00.44616 |
description | Steel Plate for Arctic Fox, similar to POPCAT |
homepage | https://github.com/iochen/steel-plate |
repository | https://github.com/iochen/steel-plate |
max_upload_size | |
id | 637189 |
size | 596,458 |
Project Steel Plate for Arctic Fox (or 雪狐桑)
You can help improve the UI design by pulling request.
Additionally, authorized media materials will also be highly appreciated.
(Tested on Apple Silicon ONLY)
x86_64-unknown-linux-musl
with command below:$ rustup target add x86_64-unknown-linux-musl
$ brew install filosottile/musl-cross/musl-cross
$ mkdir .cargo
$ echo '[target.x86_64-unknown-linux-musl]
linker = "x86_64-linux-musl-gcc"' > .cargo/config
x86_64-linux-musl-gcc
$ ln -s `where x86_64-linux-musl-gcc` /usr/local/bin/musl-gcc
$ cargo build --release --target x86_64-unknown-linux-musl
$ zip -j rust.zip ./target/x86_64-unknown-linux-musl/release/bootstrap
!!! TO BE TESTED !!!
$ cargo build --release
$ zip -j rust.zip ./target/release/bootstrap
Create function
on Lambda Functions pageAuthor from scratch
Runtime
to Provide your own bootstrap on Amazon Linux 2
Architecture
to x86_64
Create function
to finish createUpload from
under card Code source
.zip file
rust.zip
packed in the previous step, and click Save
Create table
on DynamoDB Tables pageTable name
Partition key
to key
with type String
Table settings
according to your needsCreate table
to finish createExplore items
on sidebarTable name
you set beforeCreate item
Add new attribute
, choose Number
total
where Attribute name shows key
NewValue
to value
and set its Value to 0
Create item
to finishAttach policies
under Add permissions
AmazonDynamoDBFullAccess
provides by AWS (more dangerous, but easier)Attach policies
to finish role edition
Example custom policy:{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "0",
"Effect": "Allow",
"Action": [
"dynamodb:PutItem",
"dynamodb:GetItem",
"dynamodb:UpdateItem"
],
"Resource": "arn:aws:dynamodb:xxxxxx:xxxxxxx:table/xxxxxx"
},
{
"Sid": "1",
"Effect": "Allow",
"Action": "dynamodb:ListTables",
"Resource": "*"
}
]
}
HTTP API
Integrations
to your lambda functionConfigure routes
, set Method to ANY
, Resource path to /{proxy+}
and Integration target to your lambda functionInvoke URL
, and you can finally enjoy the 100% pure steel plate of Arctic Fox!!! Standalone will store total clicks in the server memory and ONLY in the memory !!!
However, by setting env STEEL_PLATE_COUNT_BASE
, you can set the base clicks count number
$ cargo build --release
$ ./target/release/steel-plate
http://127.0.0.1:8082/
MIT LICENSE
2022 Richard Chen