Skip to content
Merged
Show file tree
Hide file tree
Changes from 8 commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
5df69dc
rust example
nthiad Jun 13, 2025
5f90e2b
move extension up into rust-data-loader example dir
nthiad Jun 16, 2025
2be5a2c
add FileExtension work-around to dev deps
nthiad Jun 16, 2025
de7da6e
use git url for foxglove_data_loader and remove path foxglove dep
nthiad Jun 17, 2025
4184b8e
use foxglove::Encode to derive schema
nthiad Jun 19, 2025
92a50a9
accelerometer instead of sphere
nthiad Jun 19, 2025
a2e5d26
update example ndjson doc comment
nthiad Jun 19, 2025
78b962d
more specific about time units
nthiad Jun 19, 2025
460a20f
use new schema builder interface
nthiad Jun 20, 2025
e6b6a78
rename add_schema to add_encode
nthiad Jun 21, 2025
4f88b2a
remove Serialize
nthiad Jun 21, 2025
48538a0
refactor for init.get_channel()
nthiad Jun 25, 2025
d849852
less complicated way of holding onto Initialization
nthiad Jun 25, 2025
2e0d4a4
remove unused deps
nthiad Jun 25, 2025
50fb395
make rust name match package.json name
nthiad Jun 25, 2025
6e3f804
cargo fmt
nthiad Jun 25, 2025
c2de611
use DataLoader mutable interface
nthiad Jun 25, 2025
0d305f1
using mutable iterator interface
nthiad Jun 25, 2025
f880cc3
add build:wasm to build script
nthiad Jun 25, 2025
b58bdca
fmt
nthiad Jun 25, 2025
1216199
use commit rev in rust example for foxglove_data_loader
nthiad Jun 27, 2025
72a1373
<= comparison
nthiad Jul 3, 2025
9eaab99
use Accelerometer with Encode instead of Vector3
nthiad Jul 3, 2025
a0d5b02
fix wasm url
nthiad Jul 4, 2025
3cc9e5d
use binary search and reverse find
nthiad Jul 4, 2025
0c4b9f8
Merge remote-tracking branch 'origin/main' into synthia/fg-11789-crea…
nthiad Jul 4, 2025
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
4 changes: 4 additions & 0 deletions examples/rust-data-loader/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
dist
node_modules
rust/Cargo.lock
rust/target
5 changes: 5 additions & 0 deletions examples/rust-data-loader/.prettierrc.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
arrowParens: always
printWidth: 100
trailingComma: "all"
tabWidth: 2
semi: true
5 changes: 5 additions & 0 deletions examples/rust-data-loader/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Example ndjson data loader version history

## 1.0.0

- Initial version
25 changes: 25 additions & 0 deletions examples/rust-data-loader/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# ndjson foxglove data loader example

## _A Foxglove Data Loader _

This is a simple [Foxglove](http://foxglove.dev/) [extension panel](https://docs.foxglove.dev/docs/visualization/extensions/api/panel) that demonstrates loading a custom file format.

---

Install rust with [rustup](https://www.rust-lang.org/tools/install), then install wasm32 support:

```
rustup target add wasm32-unknown-unknown
```

Then to build the rust code and generate the extension file:

```
npm install
npm run package
```

These steps will produce a `.foxe` file you can install as an extension from the Foxglove settings page.

Once you have installed this extension, you can load files with a `.ndjson` extension such as the
`example.ndjson` file included in this directory.
9 changes: 9 additions & 0 deletions examples/rust-data-loader/config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
module.exports = {
webpack: (config) => {
config.module.rules.push({
test: /\.wasm$/i,
type: "asset/inline",
});
return config;
},
};
23 changes: 23 additions & 0 deletions examples/rust-data-loader/eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
// @ts-check

const foxglove = require("@foxglove/eslint-plugin");
const globals = require("globals");
const tseslint = require("typescript-eslint");

module.exports = tseslint.config({
files: ["src/**/*.ts", "src/**/*.tsx"],
extends: [foxglove.configs.base, foxglove.configs.react, foxglove.configs.typescript],
languageOptions: {
globals: {
...globals.es2020,
...globals.browser,
},
parserOptions: {
project: "tsconfig.json",
tsconfigRootDir: __dirname,
},
},
rules: {
"react-hooks/exhaustive-deps": "error",
},
});
240 changes: 240 additions & 0 deletions examples/rust-data-loader/example.ndjson

Large diffs are not rendered by default.

Loading
Loading