Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: macros #22

Merged
merged 44 commits into from
Dec 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
acebdac
feat: add macros feature to crate
lorenzofelletti Oct 28, 2024
da21310
feat: implement tls socket macros
lorenzofelletti Oct 28, 2024
f3d8496
feat: add macro sub-module to socket
lorenzofelletti Oct 28, 2024
2baed97
refactor: make tls socket options easier to use
lorenzofelletti Oct 28, 2024
efb4de3
feat: tls_scoket macro also accept options directly
lorenzofelletti Oct 28, 2024
ab3ae85
feat: add http request utilities module
lorenzofelletti Oct 28, 2024
300d25b
fix: macros calling some_or_none macro
lorenzofelletti Oct 28, 2024
80d4a4a
feat: re-export SocketAddrV4
lorenzofelletti Oct 28, 2024
147d5b7
fix: macro imports
lorenzofelletti Oct 28, 2024
6bf1690
fix: tls macros
lorenzofelletti Oct 28, 2024
547d3a2
feat: allow to set TCP socket flags
lorenzofelletti Oct 28, 2024
4ddf52c
feat: http request macros
lorenzofelletti Nov 25, 2024
337987a
feat: add configurable http version to request macro
lorenzofelletti Nov 26, 2024
816da85
fix: disallowed token after `expr` fragments
lorenzofelletti Nov 26, 2024
52ae666
style: fix clippy warnings
lorenzofelletti Nov 26, 2024
3dd04a7
fix: typo
lorenzofelletti Nov 26, 2024
b92deb9
fix: typo
lorenzofelletti Nov 26, 2024
276bf25
refactor: rename uri to path
lorenzofelletti Nov 27, 2024
749c2ef
feat: add request render function
lorenzofelletti Nov 27, 2024
275add3
docs: improve request macro examples
lorenzofelletti Nov 27, 2024
dceb676
docs: improve request macro examples
lorenzofelletti Nov 27, 2024
bf4c7fb
feat: gate httparse behind crate flag
lorenzofelletti Dec 6, 2024
8c97bba
feat: wip
lorenzofelletti Dec 6, 2024
fa9ea35
chore: update deps
lorenzofelletti Dec 6, 2024
dba3ad4
wip
lorenzofelletti Dec 7, 2024
47f00f3
wip
lorenzofelletti Dec 7, 2024
18eead9
fix: missing authorization field in macro
lorenzofelletti Dec 7, 2024
6ca2caa
fix: authorization field in request macro
lorenzofelletti Dec 7, 2024
ae99263
fix: import
lorenzofelletti Dec 7, 2024
a5b933e
refactor: http sub-modules
lorenzofelletti Dec 7, 2024
2ee680f
fix: macros
lorenzofelletti Dec 7, 2024
05436b9
fix: missing import in macro
lorenzofelletti Dec 7, 2024
76926bf
feat: psp dep optional to allow tests
lorenzofelletti Dec 8, 2024
028fc93
ci: steup tests
lorenzofelletti Dec 8, 2024
0e501e8
tests: setup
lorenzofelletti Dec 8, 2024
58a4173
test: add authorization tests
lorenzofelletti Dec 8, 2024
b00120b
wip
lorenzofelletti Dec 8, 2024
de567cd
fix: _request macro
lorenzofelletti Dec 8, 2024
d9d70a7
fix: request rendering
lorenzofelletti Dec 10, 2024
19e65ca
test: write test for _request macro
lorenzofelletti Dec 10, 2024
060beee
fix: tests
lorenzofelletti Dec 10, 2024
6c99aa2
docs: improve documentation
lorenzofelletti Dec 10, 2024
61d774c
build: bump version and revert default features
lorenzofelletti Dec 10, 2024
bf350db
ci: bumps toolchain version
lorenzofelletti Dec 10, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/check-and-lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ on:

env:
CARGO_TERM_COLOR: always
TOOLCHAIN_VERSION: nightly-2024-06-19
TOOLCHAIN_VERSION: nightly-2024-12-09

jobs:
fmt:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:

env:
CARGO_TERM_COLOR: always
TOOLCHAIN_VERSION: nightly-2024-06-19
TOOLCHAIN_VERSION: nightly-2024-12-09

steps:
- uses: actions/checkout@v4
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/push-to-master.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:

env:
CARGO_TERM_COLOR: always
TOOLCHAIN_VERSION: nightly-2024-06-19
TOOLCHAIN_VERSION: nightly-2024-12-09

steps:
- uses: actions/checkout@v4
Expand Down
31 changes: 31 additions & 0 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Tests

on:
push:
branches:
- master
pull_request:
branches:
- master

env:
CARGO_TERM_COLOR: always
TOOLCHAIN_VERSION: nightly-2024-12-09

jobs:
test:
name: Run tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: ${{ env.TOOLCHAIN_VERSION }}
override: true

- uses: actions-rs/cargo@v1
with:
command: test
args: --no-default-features --features=http,macros
44 changes: 29 additions & 15 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 9 additions & 4 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "psp-net"
version = "0.5.4"
version = "0.6.1"
edition = "2021"
license-file = "LICENSE"
keywords = ["psp", "net", "networking", "embedded", "gamedev"]
Expand All @@ -11,17 +11,22 @@ rust-version = "1.81"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[features]
default = []
default = ["psp"]
macros = []
http = ["dep:httparse"]
psp = ["dep:psp"]

[dependencies]
psp = { version = "0.3.10" }
psp = { version = "0.3.11", optional = true}
dns-protocol = { version = "0.1.1", default-features = false }
embedded-tls = { version = "0.17.0", default-features = false }
embedded-io = { version = "0.6.1", default-features = false }
rand = { version = "0.8.5", default-features = false }
rand_chacha = { version = "0.3.1", default-features = false }
regex = { version = "1.10", default-features = false }
regex = { version = "1.11", default-features = false }
lazy_static = { version = "1.5.0", default-features = false, features = [
"spin_no_std",
] }
bitflags = { version = "2.6.0", default-features = false }
httparse = { version = "1.9.5", default-features = false, optional = true }
base64 = {version = "0.22", default-features = false, features = ["alloc"] }
Loading
Loading