summaryrefslogtreecommitdiffstats
path: root/README.md
diff options
context:
space:
mode:
authoryum <yum.food.vr@gmail.com>2025-10-11 13:04:57 -0700
committeryum <yum.food.vr@gmail.com>2025-10-11 13:04:57 -0700
commitd1ecda540ddd6e9ab53f7981de65c3e435c1132c (patch)
tree6907da6e0d4df248ce19ea825eccdf261f28ae9c /README.md
parent06780e36b2aeb1257607c89570fd99903508b82e (diff)
more stuff
Diffstat (limited to 'README.md')
-rw-r--r--README.md12
1 files changed, 12 insertions, 0 deletions
diff --git a/README.md b/README.md
index 00ff565..174ccd2 100644
--- a/README.md
+++ b/README.md
@@ -3,6 +3,17 @@
the idea here is just to make something like slangc.exe, but which doesn't
require an entrypoint.
+basics and gotchas
+
+- all functions marked `public` are exported as entrypoints.
+ - this causes slang to put their arguments in a cbuffer. we post-process them
+ to fix this.
+- any autodiff function calls within a module must *not* be to `public` APIs.
+ - this is a consequence of the prior point. any public API is seen by slang
+ as an "entrypoint" which accepts a cbuffer argument. the autodiff logic
+ does not handle this edge case, so it tries to pass arguments to a function
+ which takes no arguments.
+
build instructions
```bash
@@ -22,3 +33,4 @@ cd ../..
powershell.exe ./build.ps1 && ./build/bin/Release/modular_slange.exe ./test.slang
```
+