Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
8 changes: 4 additions & 4 deletions Cargo.lock

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

3 changes: 2 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
name = "firefly-rust"
version = "0.3.0"
edition = "2021"
rust-version = "1.81.0"
authors = ["Firefly Zero team"]
description = "Rust SDK for making Firefly Zero games"
repository = "https://github.com/firefly-zero/firefly-rust"
Expand All @@ -17,4 +18,4 @@ sudo = []
nalgebra_support = ["nalgebra"]

[dependencies]
nalgebra = { version = "0.32.5", optional = true, default-features = false }
nalgebra = { version = "0.33.0", optional = true, default-features = false }
3 changes: 2 additions & 1 deletion Taskfile.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# https://taskfile.dev
version: '3'
version: "3"

tasks:
release:
Expand All @@ -19,6 +19,7 @@ tasks:
test:
desc: "run tests"
cmds:
- rustup target add wasm32-unknown-unknown
- cargo test --all-features --lib
- >
cargo build
Expand Down
5 changes: 5 additions & 0 deletions examples/audio_chord/firefly.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
author_id = "demo"
app_id = "rust-chord"
author_name = "Demo"
app_name = "Chord Demo (Rust)"
compile_args = ["--no-default-features"]
10 changes: 10 additions & 0 deletions examples/audio_chord/main.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#![no_std]
#![no_main]
use firefly_rust::audio;

#[no_mangle]
extern fn boot() {
audio::OUT.add_sine(audio::Freq::C4, 0.);
audio::OUT.add_sine(audio::Freq::E4, 0.);
audio::OUT.add_sine(audio::Freq::G4, 0.);
}
5 changes: 5 additions & 0 deletions examples/audio_modulator/firefly.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
author_id = "demo"
app_id = "rust-mod"
author_name = "Demo"
app_name = "Modulator Demo (Rust)"
compile_args = ["--no-default-features"]
15 changes: 15 additions & 0 deletions examples/audio_modulator/main.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#![no_std]
#![no_main]
use firefly_rust::audio;

#[no_mangle]
extern fn boot() {
let gain = audio::OUT.add_gain(0.);
gain.modulate(audio::LinearModulator {
start: 0.,
end: 1.,
start_at: audio::Time::ZERO,
end_at: audio::Time::seconds(2),
});
gain.add_sine(audio::Freq::A4, 0.);
}
5 changes: 5 additions & 0 deletions examples/audio_noise/firefly.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
author_id = "demo"
app_id = "rust-noise"
author_name = "Demo"
app_name = "Noise Demo (Rust)"
compile_args = ["--no-default-features"]
8 changes: 8 additions & 0 deletions examples/audio_noise/main.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#![no_std]
#![no_main]
use firefly_rust::audio;

#[no_mangle]
extern fn boot() {
audio::OUT.add_noise(0);
}
5 changes: 5 additions & 0 deletions examples/audio_sawtooth/firefly.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
author_id = "demo"
app_id = "rust-sawtooth"
author_name = "Demo"
app_name = "Sawtooth Wave Demo (Rust)"
compile_args = ["--no-default-features"]
8 changes: 8 additions & 0 deletions examples/audio_sawtooth/main.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#![no_std]
#![no_main]
use firefly_rust::audio;

#[no_mangle]
extern fn boot() {
audio::OUT.add_sawtooth(audio::Freq::A4, 0.);
}
5 changes: 5 additions & 0 deletions examples/audio_sine/firefly.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
author_id = "demo"
app_id = "rust-sine"
author_name = "Demo"
app_name = "Sine Demo (Rust)"
compile_args = ["--no-default-features"]
8 changes: 8 additions & 0 deletions examples/audio_sine/main.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#![no_std]
#![no_main]
use firefly_rust::audio;

#[no_mangle]
extern fn boot() {
audio::OUT.add_sine(audio::Freq::A4, 0.);
}
5 changes: 5 additions & 0 deletions examples/audio_square/firefly.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
author_id = "demo"
app_id = "rust-square"
author_name = "Demo"
app_name = "Square Wave Demo (Rust)"
compile_args = ["--no-default-features"]
8 changes: 8 additions & 0 deletions examples/audio_square/main.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#![no_std]
#![no_main]
use firefly_rust::audio;

#[no_mangle]
extern fn boot() {
audio::OUT.add_square(audio::Freq::A4, 0.);
}
5 changes: 5 additions & 0 deletions examples/audio_triangle/firefly.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
author_id = "demo"
app_id = "rust-aud-tri"
author_name = "Demo"
app_name = "Triangle Wave Demo (Rust)"
compile_args = ["--no-default-features"]
8 changes: 8 additions & 0 deletions examples/audio_triangle/main.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#![no_std]
#![no_main]
use firefly_rust::audio;

#[no_mangle]
extern fn boot() {
audio::OUT.add_triangle(audio::Freq::A4, 0.);
}
2 changes: 1 addition & 1 deletion rustfmt.toml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
imports_granularity = "Module"
newline_style = "Unix"
use_field_init_shorthand = true
force_explicit_abi = false

## Uncomment when stabilized:
# group_imports = "One"
# hex_literal_case = "Lower"
# imports_granularity = "Module"
# normalize_comments = true
# normalize_doc_attributes = true
# reorder_impl_items = true
Expand Down
Loading