Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
84fc97f
Update kotlin java version
loucass003 Mar 19, 2026
f784b4b
New kotlin generator
loucass003 Mar 20, 2026
6ef8a14
Fix 0 reporting null
loucass003 Mar 25, 2026
c3dfef4
OSC stuff
loucass003 May 9, 2026
311db6b
Cleaner kotlin codegen + unit tests / basics for KMP maybe
loucass003 May 10, 2026
44f8afe
Sync with main
loucass003 May 26, 2026
561febb
Bring back osc changes
loucass003 May 26, 2026
1531bbb
Update solarxr with main
loucass003 Jun 17, 2026
6680d55
Update solarxr with main AGAIN
loucass003 Jun 17, 2026
473e08f
Bring back osc changes
loucass003 May 26, 2026
cebab9a
Clean up formatting and comments
Erimelowo Jun 19, 2026
98ec259
file_extension seems to be a reserved keyword
Erimelowo Jun 19, 2026
98e137b
nuke drift compensation
Erimelowo Jun 19, 2026
b13daad
Clean up ModelRatios and ModelToggles
Erimelowo Jun 19, 2026
597d098
Remove deprecated stuff
Erimelowo Jun 19, 2026
1eada8f
Simplified ModelRatios
Erimelowo Jun 19, 2026
40b2fb0
Nuke OSC Router
Erimelowo Jun 19, 2026
dcc82e7
Add impute_spine_curvature
Erimelowo Jun 19, 2026
da790c5
OutputTrackersSetting
Erimelowo Jun 19, 2026
f9dc0c5
Fix schema
Erimelowo Jun 20, 2026
7e6a502
Generate flatbuffer
Erimelowo Jun 20, 2026
b8160c4
Fix file_extension comment
Erimelowo Jun 20, 2026
661f300
Remove pub_sub
Erimelowo Jun 23, 2026
e606fbe
Clean up and use snake_case everywhere
Erimelowo Jun 23, 2026
dbcba50
Get rid of TimeoutSettings
Erimelowo Jun 23, 2026
43d5825
Remove pub_sub include
Erimelowo Jun 23, 2026
3dc84e1
Generate flatbuffer
Erimelowo Jun 23, 2026
e2df59c
Remove TrackerId and DeviceId
Erimelowo Jun 23, 2026
ec53c71
Generate flatbuffer
Erimelowo Jun 23, 2026
a277517
Split settings into 8
Erimelowo Jun 23, 2026
09b08da
Generate flatbuffer
Erimelowo Jun 23, 2026
cb785f1
Split rpc into modules
Erimelowo Jun 23, 2026
26dac36
Generate flatbuffer
Erimelowo Jun 23, 2026
bc6a10f
Move SkeletonToggles down
Erimelowo Jun 23, 2026
47b3148
output trackers can be handled by skeleton
Erimelowo Jun 23, 2026
0829126
generate flatbuffer
Erimelowo Jun 23, 2026
230acaf
Move temporary states into separate requests and responses
Erimelowo Jun 23, 2026
ccacaf2
Generate flatbuffer
Erimelowo Jun 23, 2026
bfa2684
SkeletonConfig -> SkeletonProportions
Erimelowo Jun 23, 2026
d7edb80
generate flatbuffer
Erimelowo Jun 23, 2026
efaf24f
Fix enums being pascalcase instead of allcaps
Erimelowo Jun 23, 2026
5786fd4
Fix ServerGuards naming
Erimelowo Jun 24, 2026
17da40a
ArmsResetMode
Erimelowo Jun 24, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -35,3 +35,4 @@ node_modules/

# direnv has been claimed for Nix usage
.direnv/
.kotlin
3 changes: 3 additions & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
plugins {
base
}
41 changes: 37 additions & 4 deletions flake.lock

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

16 changes: 13 additions & 3 deletions flake.nix
Original file line number Diff line number Diff line change
@@ -1,19 +1,29 @@
{
description = "A hardware-agnostic serialization protocol for full body tracking (FBT) in VR";

inputs.nixpkgs.url = "nixpkgs/nixos-22.11";
inputs.nixpkgs.url = "nixpkgs/nixos-unstable";
inputs.nixpkgs-jdk24.url = "github:NixOS/nixpkgs/d0fc30899600b9b3466ddb260fd83deb486c32f1";
inputs.nixpkgs-flatbuffers.url = "nixpkgs/nixos-22.11";
inputs.flake-utils.url = "github:numtide/flake-utils";

outputs = { self, nixpkgs, flake-utils }:
outputs = { self, nixpkgs, nixpkgs-jdk24, nixpkgs-flatbuffers, flake-utils }:
flake-utils.lib.eachDefaultSystem (system:
let
pkgs = nixpkgs.legacyPackages.${system};
jdkPkgs = import nixpkgs-jdk24 { inherit system; };
java = jdkPkgs.javaPackages.compiler.temurin-bin.jdk-24;
pkgsFlatbuffers = nixpkgs-flatbuffers.legacyPackages.${system};
in {
devShells.default = pkgs.mkShell {
nativeBuildInputs = [
pkgs.flatbuffers
pkgsFlatbuffers.flatbuffers
pkgs.direnv
java
];
shellHook = ''
export JAVA_HOME=${java}
export PATH="${java}/bin:$PATH"
'';
};
}
);
Expand Down
4 changes: 2 additions & 2 deletions generate-flatbuffer.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ Remove-Item -ErrorAction Ignore -Recurse protocol/java/src
Remove-Item -ErrorAction Ignore -Recurse protocol/cpp/include/solarxr_protocol/generated
Remove-Item -ErrorAction Ignore -Recurse protocol/typescript/src
Remove-Item -ErrorAction Ignore -Recurse protocol/rust/src/generated
Remove-Item -ErrorAction Ignore -Recurse protocol/kotlin/src
Remove-Item -ErrorAction Ignore -Recurse protocol/kotlin/src/generated/kotlin


./flatc.exe --java --gen-object-api --gen-all -o protocol/java/src -I ./schema/ ./schema/all.fbs
./flatc.exe --cpp --scoped-enums --gen-all -o protocol/cpp/include/solarxr_protocol/generated -I ./schema/ ./schema/all.fbs
./flatc.exe --ts --gen-object-api --gen-all -o protocol/typescript/src -I ./schema/ ./schema/all.fbs
./flatc.exe --rust --rust-module-root-file --gen-all -o protocol/rust/src/generated ./schema/all.fbs
./flatc.exe --kotlin --gen-jvmstatic --gen-all -o ./protocol/kotlin/src -I ./schema/ ./schema/all.fbs
./gradlew.bat :codegen:run --args="-o ./protocol/kotlin/src/generated/kotlin -I ./schema/ ./schema/all.fbs"
4 changes: 2 additions & 2 deletions generate-flatbuffer.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ rm -rf protocol/java/src
rm -rf protocol/cpp/include/solarxr_protocol/generated
rm -rf protocol/typescript/src
rm -rf protocol/rust/src/generated
rm -rf protocol/kotlin/src
rm -rf protocol/kotlin/src/generated/kotlin

flatc --java --gen-object-api --gen-all -o ./protocol/java/src -I ./schema/ ./schema/all.fbs && \
flatc --cpp --scoped-enums --gen-all -o ./protocol/cpp/include/solarxr_protocol/generated -I ./schema/ ./schema/all.fbs && \
flatc --ts --gen-object-api --gen-all -o ./protocol/typescript/src -I ./schema/ ./schema/all.fbs && \
flatc --rust --rust-module-root-file --gen-all -o ./protocol/rust/src/generated ./schema/all.fbs && \
flatc --kotlin --gen-jvmstatic --gen-all -o ./protocol/kotlin/src -I ./schema/ ./schema/all.fbs
./gradlew :codegen:run --args="-o ./protocol/kotlin/src/generated/kotlin -I ./schema/ ./schema/all.fbs"
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5.1-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.4-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
File renamed without changes.
182 changes: 91 additions & 91 deletions protocol/kotlin/gradlew.bat → gradlew.bat

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

5 changes: 5 additions & 0 deletions kotlin-codegen/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Ignore Gradle project-specific cache directory
.gradle
.kotlin
# Ignore Gradle build output directory
build
71 changes: 71 additions & 0 deletions kotlin-codegen/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
plugins {
kotlin("jvm")
application
}

repositories {
mavenCentral()
}

val generatedTestSourcesDir = layout.buildDirectory.dir("generated/test-schemas")

kotlin {
jvmToolchain(24)
compilerOptions {
jvmTarget = org.jetbrains.kotlin.gradle.dsl.JvmTarget.JVM_24
}
sourceSets {
test {
kotlin.srcDir(generatedTestSourcesDir)
}
}
}

application {
mainClass = "dev.slimevr.fbscodegen.MainKt"
}

tasks.named<JavaExec>("run") {
dependsOn(tasks.named("classes"))
workingDir = projectDir.parentFile
}

val generateTestSchemas by tasks.registering(JavaExec::class) {
dependsOn(tasks.named("classes"))
group = "verification"
description = "Generates Kotlin fixtures from test FlatBuffers schemas."
classpath = sourceSets.main.get().runtimeClasspath
mainClass = application.mainClass
workingDir = projectDir
outputs.dir(generatedTestSourcesDir)
doFirst {
delete(generatedTestSourcesDir)
}
args(
"-o",
generatedTestSourcesDir.get().asFile.absolutePath,
"-I",
projectDir.resolve("src/test/resources/schemas").absolutePath,
projectDir.resolve("src/test/resources/schemas/all.fbs").absolutePath,
)
}

tasks.named("compileTestKotlin") {
dependsOn(generateTestSchemas)
}

tasks.test {
useJUnitPlatform()
}

dependencies {
implementation("com.squareup:kotlinpoet:2.2.0")
val generatedProjectPath = sequenceOf(":solarxr-protocol:generated", ":generated")
.firstOrNull { rootProject.findProject(it) != null }
?: error("Cannot find the generated SolarXR protocol project")

testImplementation(project(generatedProjectPath))
testImplementation(gradleTestKit())
testImplementation("com.google.flatbuffers:flatbuffers-java:22.10.26")
testImplementation(kotlin("test"))
}
Loading